SHARE
TWEET

Untitled

a guest May 3rd, 2016 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="en" ng-app="the_app">
  3.   <head>
  4.     <meta charset="utf-8">
  5.  
  6.     <base href="/client/">
  7.   </head>
  8.   <body>
  9.     <h1>Hello, world!</h1>
  10.  
  11.     <div ng-view></div>
  12.  
  13.     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.js"></script>
  14.     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-resourse.js"></script>
  15.     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-route.js"></script>
  16.  
  17.     <script>
  18.      var app = angular.module('the_app', [
  19.        'ngRoute',
  20.        'my_controllers']);
  21.  
  22.      app.config(['$routeProvider', '$locationProvider',
  23.                  function($routeProvider, $locationProvider) {
  24.                    $routeProvider.
  25.                           when('/', {
  26.                             controller: 'mainCtrl'
  27.                           }).
  28.                                when('/login', {
  29.                                  controller: 'loginCtrl'
  30.                                }).
  31.                                     otherwise({
  32.                                       redirectTo: '/'
  33.                                     });
  34.  
  35.                    $locationProvider.html5Mode(true);
  36.                  }]);
  37.  
  38.      var my_controllers = angular.module('my_controllers', []);
  39.  
  40.      my_controllers.controller('mainCtrl', ['$scope', '$http',
  41.                                             function ($scope, $http) {
  42.                                             }]);
  43.  
  44.      my_controllers.controller('loginCtrl', ['$scope', '$http',
  45.                                              function ($scope, $http) {
  46.                                              }]);
  47.     </script>
  48.   </body>
  49. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top