angular.module('dodgie', []).config(function($routeProvider){
$routeProvider.when('/home', {template:'/partials/home.html', controller:dodgieCtrl }).
otherwise({redirectTo:'/home'});
});
function dodgieCtrl($scope, $location){
$scope.doSearch = function(){
if ( !$scope.newTodo.length ) {
return;
}
};
};
The content of :
<div id="content" ng-view></div>
is instead:
<span class="ng-scope">/partials/home.html</span>
why isn't my partials being rendered?
It looks like a typo try templateUrl
instead of template
:
angular.module('dodgie', []).config(function($routeProvider){
$routeProvider.when('/home', {templateUrl:'/partials/home.html', controller:dodgieCtrl }).
otherwise({redirectTo:'/home'});
});
Taken from the docs:
Use 'templateUrl' instead of 'template' if you intend to specify url.