Angularjs interview questions. In this tutorial, we will discuss Interview questions based on angularjs with answers. This tutorial will help both fresher and experienced candidates.
What is AngularJS
Features of AngularJS
There are lots of feature in angularJS and some of these are as follows: -
- It supports two-way binding
- It supports mvc concept
- It supports routing
- It provides dependency injection
- Testing is also very easy in angularJS
What is directives
Directives in angularJS extends HTML code to provide new behaviour.
What ng represent
Ng represents angular.
What is ng-app directive
ng-app directive is the beginning directive of angularJS. It is used to auto bootstrap angularJS application. We generally use this directive at root level like inside html tag or in body tag.
What is data-ng-app
We use data-ng-app directives to validate HTML5 because it will consider data-ng-app as custom attribute. If we will write only ng-app then html5 validator throw an exception.
What is module in angularjs
Module in angularjs is just like container which is having the business logics, controllers, services etc. it is just like main. As main contain the startup logic and in angularjs we use module for startup.
What is controller
What is $scope in angularjs
$scope is the kind of object which represents the application model. It is used to pass data between view and controller. We can add properties in this scope and we can use it.