1
   var voteApp = angular.module('VoteApp', [
    'ngRoute',
    'students'
    ]);

voteApp.config(function($routeProvider){
    $routeProvider.when('/', {
        templateUrl : 'index.html',
        controller : 'MainController'
    });
});


voteApp.controller('MainController',['$scope',function($scope){

 }]);

On loading, the whole page will crash!

Can anyone help me with this?

Channox
  • 251
  • 2
  • 7

1 Answers1

0
  1. Did you run your application on a server? If not go to your terminal and type in this: python -m SimpleHTTPServer and then open your application on localhost
  2. Try using angular-ui-router instead of angular-route What is the difference between angular-route and angular-ui-router?
Community
  • 1
  • 1
thadeuszlay
  • 2,787
  • 7
  • 32
  • 67