Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html ng-pp='app' lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta charset="utf-8" />
- <title>Friends</title>
- <script src='angular/angular.js'></script>
- <script src='angular-route/angular-route.js'></script>
- <script src='app.js'></script>
- </head>
- <body>
- <p>
- <a href='#!/list'>All Your Frinds</a> | <a href='#!/new'>Add a Friend</a>
- </p>
- <div ng-view=''>
- </div>
- </body>
- </html>
- var app = angular.module('app', ['ngRoute']).config(function ($routeProvider)
- {
- $routeProvider
- .when('/list',
- {
- templateUrl: 'partials/list.html'
- })
- .when('/new',
- {
- templateUrl: 'partials/create.html'
- })
- .when('/show/:id',
- {
- templateUrl: 'partials/show.html'
- })
- .when('/edit/:id',
- {
- templateUrl: 'partials/edit.html'
- })
- .otherwise(
- {
- redirectTo: '/'
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement