.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Melody Anderson
Eminent IT

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Post New Question Subscribe to Interview Questions
Quick Links For Interview Questions Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  OOPs  JQuery  JavaScript/VBScript
NetworkingAptitudeOthers  All    

JavaScript/VBScript Interview Questions and Answers

Best Angular js Interview Questions 2018

Author: Sharad          Posted Date: May 02, 2018    Category: JavaScript/VBScript     Points: 40

Here is list of 10 Best Angular Js Interview questions and answers.

1. What is Angular JS?

AngularJS is a JavaScript framework that is used for making rich, extensible web applications. It runs on plain JavaScript and HTML, so you don't need any other dependencies to make it work.AngularJS is perfect for Single Page Applications (SPA). It is basically used for binding JavaScript objects with HTML UI elements.

2. Explain the architecture of AngularJS?

AngularJS is architecture on 3 components. They are

The Template (View)
The Scope (Model)
The Controller (Controller)
AngularJS extends HTML attributes with Directives and binds data to HTML with Expressions.

3. What is the Template in AngularJS?

The template is the HTML portion of the angular app. It is exactly like a static HTML page, except that templates contain additional syntax which allows data to be injected in it in order to provide a customized user experience.

4. What is the scope in AngularJS?

The scope is the object that represents the "model" of your application. It contains fields that store data which is presented to the user via the template, as well as functions which can be called when the user performs certain actions such as clicking a button.

5. What is the controller in AngularJS?

The controller is a function which generally takes an empty scope object as a parameter and adds to it the fields and functions that will be later exposed to the user via the view.

6. Explain Directives in AngularJs?

AngularJS directives are extended HTML attributes with the prefix ng-
The 3 main directives of angular js are

ng-app:- directive is used to flag the HTML element that Angular should consider to be the root element of our application. Angular uses spinal-case for its custom attributes and camelCase for the corresponding directives which implement them.
ng-model:- directive allows us to bind values of HTML controls (input, select, textarea) to application data. When using ngModel, not only change in the scope reflected in the view, but changes in the view are reflected back into the scope.
ng-bind:- directive binds application modal data to the HTML view.
7. List some tools for testing AngularJS applications?

For testing AngularJS applications there are certain tools that you should use that will make testing much easier to set up and run.


Karma is a JavaScript command line tool that can be used to spawn a web server which loads your application's source code and executes your tests. You can configure Karma to run against a number of browsers, which is useful for being confident that your application works on all browsers you need to support. Karma is executed on the command line and will display the results of your tests on the command line once they have run in the browser.

Karma is a NodeJS application and should be installed through NPM/YARN. Full installation instructions are available on the Karma website.


Jasmine is a behavior-driven development framework for JavaScript that has become the most popular choice for testing AngularJS applications. Jasmine provides functions to help with structuring your tests and also making assertions. As your tests grow, keeping them well structured and documented is vital, and Jasmine helps achieve this.

Jasmine comes with a number of matches that help you make a variety of assertions. You should read the Jasmine documentation to see what they are. To use Jasmine with Karma, we use the karma-jasmine test runner.


AngularJS also provides the ngMock module, which provides mocking for your tests. This is used to inject and mock AngularJS services within unit tests. In addition, it is able to extend other modules so they are synchronous. Having tests synchronous keeps them much cleaner and easier to work with. One of the most useful parts of ngMock is $httpBackend, which lets us mock XHR requests in tests and return sample data instead.


8. How do you share data between controllers in AngularJs?

We can share data by creating a service,
Services are easiest, fastest and cleaner way to share data between controllers in AngularJs.
There are also other ways to share data between controllers, they are

Using Events
$parent, nextSibling, controllerAs
Using the $rootScope
9. Explain AngularJS digest cycle?

AngularJS digest cycle is the process behind Angular JS data binding.
In each digest cycle, Angular compares the old and the new version of the scope model values. The digest cycle is triggered automatically. We can also use $apply() if we want to trigger the digest cycle manually.

10. What is internationalization in Angularjs?

Internationalization is a way to show locale-specific information on a website.It is used to create multilingual language websites.
Read 80+ AngularJS interview Questions and Answers from https://www.onlineinterviewquestions.com/angular-js-interview-questions/

What do you mean by Constructor?

Author: PLC Technologies          Posted Date: December 17, 2014    Category: JavaScript/VBScript     Points: 40

Constructor gets invoked when a new object is created. Every class has a constructor. If we do not explicitly write a constructor for a class the java compiler builds a default constructor for that class.

What is isNaN function in JavaScript?

Author: Subhransu Sekhar Jena          Posted Date: September 28, 2014    Category: JavaScript/VBScript     Points: 40

It's return true if the argument is not a number

What are JavaScript types?

Author: Subhransu Sekhar Jena          Posted Date: September 28, 2014    Category: JavaScript/VBScript     Points: 40

Boolean, Function, Object, Null, Number, Object, String, Undefined.

How to detect the operating system on the user machine in javascript?

Author: Subhransu Sekhar Jena          Posted Date: September 28, 2014    Category: JavaScript/VBScript     Points: 40

We can use appVersion string. This is property.

How to show modal pop up upon on focus of a text area

Author: Ashutosh Jha          Posted Date: July 31, 2014    Category: JavaScript/VBScript     Points: 40

Below is the javascript code that can be used to show the pop up box upon on focus of a text area-

$('#myModal').on('shown', function () {

How do you check if a variable is an array in JavaScript

Author: Ashutosh Jha          Posted Date: July 29, 2014    Category: JavaScript/VBScript     Points: 40

if (i2 instanceof Array) {
alert('v1 is Array!');
} else {
alert('i2 is not an array');

What is the downside of JavaScript minification?

Author: Daniel Bhagathsingh          Posted Date: December 30, 2013    Category: JavaScript/VBScript     Points: 40

They are harder to read and debug. However, for development and debugging we can use non-minified versions. Just before deployment, minify and use the minified versions on the production environment.

What is the difference between jquery.js and jquery.min.js?

Author: Daniel Bhagathsingh          Posted Date: December 30, 2013    Category: JavaScript/VBScript     Points: 40

jquery.min.js is the minified version, where as jquery.js is the non-minified version. In your production website always use minified files as they download faster and consumes less bandwidth.

Is any of the functionality lost because of minification?

Author: Daniel Bhagathsingh          Posted Date: December 30, 2013    Category: JavaScript/VBScript     Points: 40

No, the functionality will be exactly the same as before.
« Previous12345678910….1516Next »

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend