It is javascript framework based on MVC architecture.It can be used to do a lot of task that used to take couple of Javascript lines in fewer lines of code.
Q2 . What are Directives in AngularJS?
SOLUTION
A directive is part of the angular that tell what a specific unit or chunk of code is supposed to do.
ng-app marks the content inside the angular
ng-repeat repeats a block a certain amount of times
ng-bind can be used to bind a specific element to an angular element.
Q3 . What are expressions in AngularJS?
SOLUTION
We can use {{}} to display the angular elements are called expressions.We can display a variable used inside controller or just intialize using ng-init.The expression can be any values assigned or even bound using ng-bind.
Q4 . What are modules in AngularJS?
SOLUTION
Modules are the components that define an application.We can create a module
var app=angular.module("appname",[])
.We can define the controller that are going to be used inside the module.
Q5 . What is MVC framework ?
SOLUTION
MVC stands for model view controller.Model is the data that has the business logic for example to compute the intrest for a loan.
View is the customer trying to view the data after computation
Controller is passing the data across model and view.
Q6 . What is MVC framework in AngularJS perspective?
SOLUTION
Model in Angular JS can be any computed data or variable present in the module.View we can display the computed variable using an expression{{}}.We know all the manipulation of all data or computation happens inside a controller.This relates to the MVC framework.
Q7 . What are controllers in AngularJS?
SOLUTION
Controllers are parts of modules that help in performing tasks or operations to manipulate the data.
To create a controller
app.controller('appname', function($scope) {}
Q8 . What is a service?
SOLUTION
A service is like a small code that can be invoked when require inside our ng-app or Angular application.some examples of services are
$http
$location
$interval
Q9 . What is a filter in AngularJS?
SOLUTION
Filters are as the name suggests ways to limit the data to the intended limit or format to get desired results.Some examples of filters are
>orderby
>lowercase
Q10 . what is use of ng-init in AngularJS?
SOLUTION
It can be used to evaluate the expression.We can intialise some of the variables to be used in the scope of the application
<div ng-app="myappname" ng-init="textval='This my application'">
textval can be used in the application to give the value througout the application.