Angular Js
Angular Js
Mendel Rosenblum
Widely used framework (Angular 1 - 2009) with a major rewrite coming out
(Angular 2)
CS142 will use Angular 1
Directive Allows developer to extend HTML with own elements and attributes (reusable pieces)
Scope Context where the model data is stored so that templates and controllers can access
Data Binding Syncing of the data between the Scope and the HTML (two ways)
Read of object model will locate it in whatever inherited scope it is in. yourName
will be create in that object in the right scope.
AngularJS solution: You can use either, Angular will map them to the same thing.
<div ng-include="'navBarHeader.html'"</div>
<div ng-include="'components/example/exampleTemplate.html'"
ng-controller="ExampleController"></div>
Example: