While i came across AngularJS, I was fascinatred. When I had worked through the group of tutorials available on the AngularJS website, I was thrilled to get found this framework.
What exactly is AngularJS? AngularJS is the (relatively) new framework in the web development space.
According to Wikipedia the goal of Angular is to increase browser-based applications with model-view-controller (MVC) architecture, and it really does just that, providing a binding/MVC platform.With a structure as basic as my data, a person bind data to your web page. The $scope service picks up changes to the model as well as modifies HTML expressions within the view by way of controllers. Doing work in the other direction, changes to the view outside the window are reflected in the product. This removes the need for most DOM manipulations a lot of us take for granted while using something like JQuery.
Angular uses directives to connect its action into the web page. Directives, all prefaced along with ng-, are placed in code attributes.
Some common directives which come pre-built with Angular are generally:
ng-app: this is essentially the primary entry point of Angular on the page. It tells Angular where it gets to work. is all it takes to specify a page as an Angular app.
ng-bind: changes the text associated with an element to the value of a manifestation.
will display the value of ‘name’ inside span. Any changes to ‘name’ are reflected instantly from the DOM anywhere the changing is used.
ng-repeat: creates the very clean hook structures in your page.
effortlessly loops by way of each item in the assortment.
Earlier before, the ng-app connaissance in the tag sets typically the stage for Angular working out in the page.
Add to the site head to bring in the Angular framework itself.
function ItemListCtrl ($scope) $scope. items sama dengan “description”: “coffee pot”, “description”: “nerf gun”, “description”: “phone”,;
and double-bracket observation tells Angular what words and phrases to evaluate.
ng-repeat is a perfectly succinct repeater directive in which loops through the current assortment and does the specified action or maybe provides the specified data. Its so simple and clean.
Goods on my desk: item. outline
This simple set up displays:
Stuff on my desk: java pot nerf gun telephone