Run route angularjs without server -


i need run router without nodejs server. possible. other files routing having in same directory.but not routing url desired pages. first page 'online_exam_1.html' content not displaying while open page browser.

<html data-ng-app="demoapp" > <head>  <title> online exam syatem  </title>  </head> <body ><div class="container" ng-controller="routingcontroller">     <div>         <h3>adding module configuration , routing</h3>         <!-- ng-view handles loading partials based              upon routes -->         <div data-ng-view></div>     </div> </div> <script src="angular.min.js"> <script src="angular_route.js"> </script> </script> <script>     demoapp.config(function ($routeprovider) {         alert('in');         $routeprovider             .when('/',                 {                     controller: 'routingcontroller',                     templateurl: urlbase + 'online_exam_1.html'                 })             //define route has route parameter in (:customerid)             .when('/2',                 {                     controller: 'routingcontroller',                     templateurl: urlbase + 'online_exam_2.html'                 })             .otherwise({ redirectto: '/partial1' });     });      demoapp.controller('routingcontroller', function ($scope) {         $scope.customers = [             { name: 'dave jones', city: 'phoenix' },             { name: 'jamie riley', city: 'atlanta' },             { name: 'heedy wahlin', city: 'chandler' },             { name: 'thomas winter', city: 'seattle' }         ];     }); </script>   </body> </html> 


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -