Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

AngularJS Interview Questions and Answers

In this section, we will share the AngularJS interview questions and answers for fresher and experienced professional to crack the job interviews.

Question 1) What is AngularJS?
Angularjs is a JavaScript-based open-source front-end web application framework mainly maintained by Google Inc. The Google Team released the initial version of AngularJS on October 20, 2010; 7 years ago.


Question 2) What is scope in AngularJS?
The Scopes are objects in AngularJS that refer to the model and they act as glue between controller and view.
Question 3) How to define the constant in AngularJS?
The constants are used to pass values during the config phase. Below is the example to define the constant in angularJS applications.
mainApp.constant("configParam", "constant value");

Question 4) What is factory method in AngularJS?
In the factory method, first we define a factory and then assign method to that factory. Below is the example to define the factory and assign a method ot it.
var mainApp = angular.module("mainApp", []);

mainApp.factory('MathService', function() {     
   var factory = {};  
        
   factory.multiply = function(a, b) {
      return a * b 
   }
   return factory;
});

Question 5) What are Controllers in AngularJS?
Controllers are the actally the Javascript functions which provide data and logic to the HTML UI. As the name suggests, Controllers controls the data flows from the server to User interface (UI).

The post Angularjs Interview Questions and Answers appeared first on FreeWebMentor.



This post first appeared on Programming Blog Focused On Web Technologies, please read the originial post: here

Share the post

AngularJS Interview Questions and Answers

×

Subscribe to Programming Blog Focused On Web Technologies

Get updates delivered right to your inbox!

Thank you for your subscription

×