Can anyone tell me if it is valid to use $routeProvider
with Controller as syntax
? I am having issues accessing <h1>{{kickController.foo}}</h1>
from the controller where this.foo
resides.
angular.module('ucp.kick', ['ngRoute']).config(function($routeProvider, APP_BASE_URL) {
return $routeProvider.when(APP_BASE_URL + 'kicks', {
reloadOnSearch: false,
navitem: true,
name: 'Kicks',
templateUrl: 'kick/partials/kick.html',
controller: 'kick as KickController'
});
});