1.What are the controllers in AngularJS?
2.Explain directives in AngularJS.
Directives are makers on DOM elements(such as elements,attributes,css).These can be used to create custom HTML tags that serve as new, custom widgets. AngularJS has built-in directives to perform most of the task that developers have to do.
3.What is deep linking in AngularJS?
Deep linking allows you to encode the state of application in the URL so that it can be bookmarked. The application can then be restored from the URL to the same state.
4.What are the key features of AngularJS?
5.Explain what is linking functions and type of linking function?
Link combines the directives with a scope and produce a live view. For registering DOM listeners as well as updating the DOM, link function is responsible.After the template is cloned,it is executed.
Pre-linking function: Pre-linking function is executed before the child elements are linked.It is not considered as the safe way for DOM transformation.
Post linking function:Post linking function is executed after the child elements are linked.It is safe to do DOM transformation by post-linking function.
6.What is injector?
An injector is a service locator.It is used to retrieve object instances as defined by provider,instantiate types,invoke methods and load modules. There is a single injector per Angular application, it helps to look up an object instance by its name.
7.Explain the role of $routeprovider in AngularJS.
The $routeprovider is used to configure roots within an AngularJS application.It can be used to link an url with a corresponding HTML page or template, and a controller.
8.What is scope in AngularJS?
Scopes are objects that refer to the model. They act as glue between controller and view.
9.Explain templates in AngularJS.
Templates are the rendered view with information from the controller and model.These can be single file or multiple views in one page using :partials”.
10.What are the differences between service and factory methods?
Factory method is used to define a factory which can later be used to create services as and when required whereas service method is used to create a service whose purpose is to do some defined task.