angularjs set variable in html
angularjs. When using "controller as syntax" you would give your controller an alias in the html when using the ng-controller directive.In order to have the HTML display correctly we needed to set the greeting property on this inside of our controller body. I am creating an intermediate variable named In AngularJS, watch is a service to track changes on specified properties in the given scope. It is like an event listener, where the event, in this case, is the changes made to the value of the specified variable.Lets setup our app, starting with the index.html. The template tag angularjs takes one optional argument, which when it evaluates to true, it turns on AngularJSs variable expansion.Here the scope variable items is set by a surrounding ng-controller. As we can see, the template path/to/includes/item-detail. html is included twice, once christopherbaek/.Setting Environment Variables in OS X Yosemite.