I want to do something like this
<div ng-controller="test" init="category = 1">
...
</div>
and in my controller
var myApp = angular.module('myApp',[]);
myApp.controller('test', ['$scope, $http', function($scope, $http) {
$http.get('/categories' + $scope.category...
}]);
but it doesn´t work like that. any ideas on how to pass a parameter from the template to the controller definition? thank you.