I am pretty new to angular materials. I am trying to use the autocomplete feature.
I have some autocomplete sample code here; http://codepen.io/helpme/pen/KzxXPQ
The first thing that stumped me is this declaration of the controller;
<div ng-controller="DemoCtrl as ctrl" layout="column" ng-cloak="" ng-app="MyApp">
In my past angularjs code, the ng-controller is declared this way <div ng-controller="DemoCtrl"
without the as ctrl
.
What is the difference between having as ctrl
and not having it? How should the code at http://codepen.io/helpme/pen/KzxXPQ be changed if the as ctrl
is removed?