Angular JS Interview Question Set 11

Categories: Angular JS

What is the difference between the $ and the $$ prefixes?

The $$ prefix is used to define a private variable in AngularJS. This is responsible for avoiding accidental code changes due to exposure to the variables. Examples are $$observers, $$watchers, $$childScope etc.

The $ prefix is used for defining built-in core AngularJS functionalities like variable, parameter, method, or any properties. Examples are $scope, $http, $routeProvider, $watch etc.



What are the main advantages of AngularJS?

Some of the main advantages of AngularJS are given below:


  1. Allows us to create a single page application.
  2. Follows MVC design pattern.
  3. Predefined form validations.
  4. Supports animations.
  5. Open-source.



What are the disadvantages of AngularJS?

There are some drawbacks of AngularJS which are given below:

JavaScript Dependent

If end-user disables JavaScript, AngularJS will not work.

Not Secured

It is a JavaScript-based framework, so it is not safe to authenticate the user through AngularJS only.

Time Consumption in Old Devices

The browsers on old computers and mobiles are not capable or take a little more time to render pages of application and websites designed using the framework. It happens because the browser performs some supplementary tasks like DOM (Document Object Model) manipulation.



Describe MVC in reference to angular.

AngularJS is based on MVC framework, where MVC stands for Model-View-Controller. MVCperforms the following operations:


  1. A model is the lowest level of the pattern responsible for maintaining data.
  2. A controller is responsible for a view that contains the logic to manipulate that data. It is basically a software code which is used for taking control of the interactions between the Model and View.
  3. A view is the HTML which is responsible for displaying the data.



What is $scope?

A $scope is an object that represents the application model for an Angular application.


Each AngularJS application can have only one root scope but can have multiple child scopes. For example:

var app = angular.module('myApp', []);      

app.controller('myCtrl', function($scope) {      

    $scope.carname = "Volvo";      

});  



Is AngularJS dependent on JQuery?

AngularJS is a JavaScript framework with key features like models, two-way binding, directives, routing, dependency injections, unit tests, etc. On the other hand, JQuery is a JavaScript library used for DOM manipulation with no two-way binding features.



What IDE's are currently used for the development of AngularJS?

A term IDE stands for Integrated Development Environment. There are some IDE's given below which are used for the development of AngularJS:

  1. Eclipse : It is one of the most popular IDE. It supports AngularJS plugins.
  2. Visual Studio : It is an IDE from Microsoft that provides a platform to develop web apps easily and instantly.
  3. WebStorm : It is one of the most powerful IDE for modern JavaScript development. It provides an easier way to add dependencies with angular CLI.
  4. Aptana : It is a customized version of Eclipse. It is free to use.



What are the features of AngularJS?

Some important features of AngularJS are given below:

MVC- In AngularJS, you just have to split your application code into MVC components, i.e., Model, View, and the Controller.

Validation- It performs client-side form validation.

Module- It defines an application.

Directive- It specifies behavior on the DOM element.

Template- It renders the dynamic view.

Scope- It joins the controller with the views.



What are the directives in AngularJS?

Directives are the markers on DOM element which are used to specify behavior on that DOM element. All AngularJS directives start with the word "ng". There are many in-built directives in AngularJS such as "ng-app", "ng-init", "ng-model", "ng-bind", "ng-repeat" etc.

Top Blogs
Dependency Injection and AngularJS Routes Published at:- AngularJS Templates, Views, Models, Controllers Published at:- Integrating AngularJS with Other Frameworks Published at:- Testing AngularJS Applications in the IDE Published at:- End-to-End Testing with Protractor Published at:- AngularJS Views and Bootstrap Published at:- Adding a New Blog Controller Published at:- Adding a New Blog Template In Angular JS Published at:- Ways to Communicate with REST Services Published at:- Services and Business Logic and Handling User Authentication in Angular JS Published at:- Using Basic Authentication, Creating AngularJS Services, Holding User Credentials in Angular JS Published at:- AngularJS Security : why we are covering security in a book on AngularJS Published at:- MEAN Cloud and Mobile, Local Deployment and Installing Node.js, npm, and MongoDB in Angular Published at:- Angular Js MCQ Quiz (Multiple Choice Question and answers) for beginners Published at:- Angular 4 Questions - Angular 4 Quiz (MCQ) Published at:- AngularJS MCQ Quiz Questions with Answer Part 2 Published at:- AngularJS MCQ Quiz Questions with Answer Published at:- AngularJS MCQ Quiz Questions with Answer Published at:- Angular JS Interview Question Set 1 Published at:- Angular JS Interview Question Set 2 Published at:- Angular JS Interview Question Set 3 Published at:- Angular JS Interview Question Set 3 Published at:- Angular JS Interview Question Set 4 Published at:- Angular JS Interview Question Set 5 Published at:- Angular JS Interview Question Set 6 Published at:- Angular JS Interview Question Set 6 Published at:- Angular JS Interview Question Set 8 Published at:- Angular JS Interview Question Set 9 Published at:- Angular JS Interview Question Set 10 Published at:- Angular JS Interview Question Set 11 Published at:- Angular JS Interview Question Set 12 Published at:- React versus Angular What Would it be advisable for You Pick Published at:- 9 Advantages of Angular you really want to be aware if you have any desire to assemble Computerized Items Published at:-
R4R.co.in Team
The content on R4R is created by expert teams.