Jul 04

AngularJs Interview Question

1. What is AngularJs
Ans. -> AngularJs is framework, work on MVC pattern to build large scale and perfomance web application. it is easy to use and maintanance. AngularJs is powerful javascript library to create RICH Internate Application. AngularJs provides a way to write client side application in MVC structure. Application written in AngularJs automatically handle javascript code which is sutaible for all browser.
2. What is MVC.
Ans. -> Model view controller design pattern popular as MVC used to develop web application. Model is responsible for communicate with data, view responsible for display data to user, controller is control interaction between model and view.
3. What is controller in angularJs
Ans.-> Controller are javascript function that are bound to particular scope. It is function that operate on data and decide which view is to be updated show the model base data.
4. what are filter in angularJs
Ans. -> AngularJs filter select a subset of items from an array and return new array.Filters are used to show filtered items from a list of items based on defined criteria.
5. What is template in angularJs
Ans. -> Template are the render view with information from the controller and model. This can be single file and multiple views in one page using.
6. How can be initialize angularJs application data.
Ans. -> ng-init directive use to initialize application data in angularJs

my name is {{name}}

7. Describe core directive of angularJs
Ans. -> Following are core directive in angularJs.
a. ng-app – This directive defines and links an AngularJS application to HTML.
b. ng-model – This directive binds the values of AngularJS application data to HTML input controls.
c. ng-bind – This directive binds the AngularJS Application data to HTML tags.
8. Explain boot process in angularJs.
Ans. -> Following are the boot process in angularJs
a. First HTML document is loaded in browser and render by browser. Then AngularJs javascript file is loaded and global object created. after that javascript which register controller functions is excuted.
b. AngularJs scans through the html to look for angularJs app and view. Once view is located, it connects that view to the corresponding controller function.
c. AngularJS executes the controller functions. It then renders the views with data from the model populated by the controller. The page gets ready.
9. HTTP GET and HTTP POST Request in AngularJs
Ans. -> ‘$http’ service of angular is use for http request in angularJs. For http request we need to input ‘$http’ as parameter in function.

function Controller($scope,$http)
$scope.Add = function()
$http({ method: "GET", url: "http://localhost/test" }).success(function (data, status, headers, config)
// Here goes code after success

‘$http’ service api need following thing.
a. what kind of request requested by client ‘GET’ or ‘POST’.
b. Secure url on which action should happen.
c. we need to define ‘success’ function which will excute when response get from server.

$http({ method: "GET", url: "http://localhost/test" }).success(function (data, status, headers, config)
// Here goes code after success

1 comment

  1. anabolic rx24 venta mexico Lotes

    I think this iѕ among the most vital info for me.
    And i’m glad reading your article. But shоuld remark on some general
    things, The sіte style is perfect, the articles is really great : D.
    Good job, cheers

    Also visit mmy web page anabolic rx24 venta mexico Lotes

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>