I'm trying to use $routeProvider without the "templateUrl", but the controller doesn't seem to load.
app = angular.module('doc', []).config(
['$routeProvider', function($routeProvider) {
$routeProvider.when('/inbox', {
controller: InboxCntl,
}).
otherwise({redirectTo: '/inbox'})
}]
)
function MainCntl($scope, $http, $location) {
$http({method: 'GET', url: '/api/tags/get'}).
success(function(data, status, header, config) {
$scope.tags = data
$scope.nTags = data.length
})
$scope.toggle = function(event) {
ele = angular.element(event.target)
if((ele.next().css('display')) != 'none')
return
angular.element('.collapse-body').hide(200)
ele.next().toggle(200)
}
}
function InboxCntl($scope, $http, $routeParams, $route) {
$http({method: 'GET', url: '/api/feeds/get'}).
success(function(data){
$scope.feeds = data
})
}