Tag Archives: angularjs
$ctrl, this, $scope, assigning variable to view
I wrote this article basically for myself. Maybe it will be useful for someone. Angular allows to access variables via: $ctrl, controllerAs, this, $scope, simple variable name $ctrl – is default name for controller in view. So you can use it to access variables inside templates: function SearchInputController($scope, $log){ var ctrl = this; $scope.$log = […]