AngularJS - The ng-app directive

A directive is an extension of HTML language, which allows to define new behaviors compared with the pure HTML.

In general every piece of code has the prefix ng- is an AngularJS derecive.

AngularJS comes with a set of directives and each one them has its own behavior.

The first directive we met in first AngularJs Simple Program was the ng-app. This derective is very useful, because in such way, we define to the system, that we will use the AngularJS framework. It is possible to used with or without a parameter and can be placed enen in html tag or body tag



It is needed to note here that we can define just one  ng-app directive in the same HTML document.

Δεν υπάρχουν σχόλια: