I am trying to do Controller As Syntax in Angular. At this point, I have it in my routerProvider...not sure if it would matter for the issue I am having, but here it is anyways:
angular.module('ucp.kick', [
'ngRoute'
])
.config ($routeProvider, APP_BASE_URL) ->
$routeProvider
.when APP_BASE_URL + 'kicks',
name: 'Kicks'
templateUrl: 'kick/partials/kick.html'
controller: 'kick as KickController'
Here is a condensed version of my controller I have:
this.$watchCollection('filtered.devices', function(devices) {
return this.filteredDevices = devices;
});
But I get:
TypeError: Object [object Object] has no method '$watchCollection'
I realize when using the controller as syntax, you do not want inject the scope. So, how do I access $watchCollection function?