Basic questions of angularJS

Q. What is angularjs?

Angularjs is a structural javascript framework which is used for dynamic web apps.It is also perfect use for SPA(single page application).
AngularJs extends the HTML attribute using DIRECTIVES binds data with expression.

Q. How to AngularJS Extends HTML?
AngularJs Extends HTML attributes using ng-directives
Bassically use ng-directives as follow:
1. ng-app
2. ng-model
3. ng-bind

Q. Why use angularJS?
There are many reason we use angularJS. Some main points given below:
1. No need to manipulate DOM because its create own attributes.
2. Write less code
3. Easy with data filters
4. A declarative user interface
5. Work with directives

Q. How to make HTML valid page ?
To make HTML valid page use data-ng- instead ng-

Q. Basic example of angularJS with explanations?

where myApp is module which is define AngularJs application.
myCtrl is controller which is use to control angular application.
To bind data basically we use expression using double bracess.
like this :
{{expression}}
In this example I have displayed data binding is:
Full name : {{firstname + “” + lastname}}

Leave a Reply