SHARE
TWEET

Untitled

a guest Mar 20th, 2017 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2.  
  3. <html ng-pp='app' lang="en" xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5.     <meta charset="utf-8" />
  6.     <title>Friends</title>
  7.     <script src='angular/angular.js'></script>
  8.     <script src='angular-route/angular-route.js'></script>
  9.     <script src='app.js'></script>
  10. </head>
  11. <body>
  12.     <p>
  13.         <a href='#!/list'>All Your Frinds</a> | <a href='#!/new'>Add a Friend</a>
  14.     </p>
  15.     <div ng-view=''>
  16.     </div>
  17. </body>
  18. </html>
  19.    
  20. var app = angular.module('app', ['ngRoute']).config(function ($routeProvider)
  21.      {
  22.         $routeProvider
  23.         .when('/list',
  24.         {
  25.             templateUrl: 'partials/list.html'
  26.         })
  27.         .when('/new',
  28.         {
  29.             templateUrl: 'partials/create.html'
  30.         })
  31.         .when('/show/:id',
  32.         {
  33.             templateUrl: 'partials/show.html'
  34.         })
  35.         .when('/edit/:id',
  36.         {
  37.             templateUrl: 'partials/edit.html'
  38.         })
  39.         .otherwise(
  40.         {
  41.             redirectTo: '/'
  42.         })
  43.  
  44.     });
RAW Paste Data
Top