Packaging and Deploying AngularJS Web Applications
The advantage here is that AngularJS expressions with their curly braces, do
not appear in the HTML and as such are never shown to the users in their raw,
unprocessed form. Custom attributes (ng-bind) aren't recognized by the browser
and are simply ignored till AngularJS has a chance of processing them. By using
this technique we could even provide a default value for the expression as part of
the initial HTML as follows:
<div ng-controller="HelloCtrl">
Hello, <span ng-bind="name">Your name</span>!
</div>
The default value (Your name) will be rendered by a browser before AngularJS has
a chance to process the ng-bind directive.
The technique employing the ng-bind directive, as described
here, should be only used on a landing page of an application. In
subsequent pages we can safely use interpolation expressions, since
AngularJS will be loaded and ready to handle them.
Including AngularJS and application scripts
This section of the book, devoted to optimizing the landing page, wouldn't be
complete without touching upon script loading. The topic is even more important
if we consider the rising popularity of asynchronous script loaders.
Referencing scripts
Pushing