AngularJS Interview Questions

1. How to communicate between modules of your application using core AngularJS functionality.
Using services
Using events
By assigning models on $rootScope
Directly between controllers, using $parent, $$childHead, $$nextSibling, etc.
Directly between controllers, using ControllerAs, or other forms of inheritance

2. Brief on AngularJS?
AngularJS is an open-source JavaScript framework developed by Google. It is a structural framework for dynamic Web apps. It is easy to update and get information from your HTML document. It helps in writing a proper maintainable architecture, that can be tested at a client side code.
This framework is developed on MVC (Model-View-Controller) design pattern.
It provides full featured SPA (Single Page Application) framework.
It supports Dependency Injection.
It supports two-way data binding.
It provides routing features.
Testing was designed right from the beginning; so you can build robust tests.
For DOM manipulation, jqLite is built-in; which is kind of like the Mini-Me of jQuery.
Separation of the client side of an Application from the Server side.
The AngularJS framework uses Plain Old JavaScript Objects(POJO), it doesn’t need the getter or setter functions.

3. Give some built-in directives of AngularJS
ngBind,
ngModel
ngClass
ngApp
ngInit
ngRepeat

4. Explain the steps to unit test an AngularJS filter?
Inject the module that contains the filter.
Provide mocks that the filter relies on.
Get an instance of the filter using $filter(‘yourFilterName’).
Assert your expectations.