AngularJS - Interview Questions & Answers
1. What is AngularJS?
AngularJS is a javascript framework used for creating single web page applications. It allows you to use HTML as your template language and enables you to extend HTML’s syntax to express your application’s components clearly.
2. Is AngularJS a library, framework, plugin or a browser extension?
AngularJS fits the definition of a framework the best, even though it's much more lightweight than a typical framework and that's why many confuse it with a library.
AngularJS is 100% JavaScript, 100% client-side and compatible with both desktop and mobile browsers. So it's definitely not a plugin or some other native browser extension.
3. What are the key features of Angular.js ?
The key features of angular.js are:
  • Scope
  • Model
  • View
  • Controller
  • Services
  • Data Binding
  • Directives
  • Filters
  • Testable
4. What are the advantages of using Angular.js framework ?
Advantages of using Angular.js as framework are:
  • Supports two way data-binding
  • Supports MVC pattern
  • Support static template and angular template
  • Can add custom directive
  • Supports REST full services
  • Supports form validations
  • Support both client and server communication
  • Support dependency injection
  • Applying Animations
  • Event Handlers
5. What is scope in Angular.js?
Scope refers to the application model, it acts like glue between application controller and the view. Scopes are arranged in hierarchical structure and impersonate the DOM ( Document Object Model) structure of the application. It can watch expressions and propagate events.
6. What is ng-app and ng-init in AngularJS?
ng-app is used to initialize the Angular Application.
ng-init is used to initialize the Angular Application data.
7. What is services in Angular.js ?
In angular.js services are the singleton objects or functions that are used for carrying out specific tasks. It holds some business logic and these function can be called as controllers, directive, filters and so on.
8. What is controller in AngularJS?
Controller is constructor function in Angular Controller.
When a Controller is attached to the DOM with use the ng-controller, Angular will instantiate a new Controller object using constructor function.
Questions & Answers
Scripting Languages