What does this.$ mean in Angular?
I see cases where 'this' is set to a variable such as var vm = this;
Then vm is used like vm.$.Something ..
What does the vm.$ mean?
This is a classy angular example:
var app = angular.module('app', ['ngAnimate','angular-growl', 'classy']);
app.classy.controller({
name: 'TodoController',
inject: ['$scope', 'growl', 'todoStorage'],
data: {
items: 'todoStorage.get()'
},
init: function() {
this._resetTodoEntry();
},
watch: {
'{object}items': '_onTodoChange'
},
methods: {
_getRemaining: 'items | filter:{ completed: false }',
_onTodoChange: function() {
this.$.remainingCount = this._getRemaining().length;
this.todoStorage.put(this.items);
},