Well, you’re not really supposed to do that… but what you can do is put your service object in a property on your $scope, and call it from there.
app.controller('MyCtrl', function($scope, switcher) {
$scope.switcher = switcher;
});
Well, you’re not really supposed to do that… but what you can do is put your service object in a property on your $scope, and call it from there.
app.controller('MyCtrl', function($scope, switcher) {
$scope.switcher = switcher;
});