Skip to content Skip to sidebar Skip to footer

Angularjs Routing Vs Backbonejs Routing

I am getting frustrated with Angualrjs as it keeps throwing errors or just fails to work at all on my localhost despite I have followed the tutorial exactly. For instance this tuto

Solution 1:

You need ngRoute to be injected as a dependency in your module declaration.

varapp= angular.module("app", []); 

should be

varapp= angular.module("app", ['ngRoute']);

Solution 2:

var app = angular.module("app", ['ngRoute']);

app.config(['$routeProvider', function($routeProvider){
  $routeProvider.when("/",
    {
      templateUrl: "app.html",
      controller: "AppCtrl"
    }
  );
}]);

Post a Comment for "Angularjs Routing Vs Backbonejs Routing"