Mobile Support<\/strong><\/td>\r\n| AngularJS does not provide any mobile support.<\/td>\r\n | Angular provides mobile support.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n\r\n \t- What is Annotation?<\/strong><\/li>\r\n<\/ol>\r\nThe Annotation in Angular is the “only” metadata set of a class using a Reflect Metadata library. It is used for creating an annotation array.\r\n
\r\n \t- What is Decorator in AngularJS?<\/strong><\/li>\r\n<\/ol>\r\nThe Decorator is the design pattern that is used for separating the decoration or modification of the class without altering the actual source code.\r\n
\r\n \t- What is a factory method in AngularJS?<\/strong><\/li>\r\n<\/ol>\r\nFactory Method is used for creating the directive. This is only invoked once if the compiler matches with directives for the first time. We can also invoke the factory method by using the $injector.invoke.\r\n
\r\n \t- List the styling form that ng Model adds to the CSS classes?<\/strong><\/li>\r\n<\/ol>\r\nBelow are the ngmodel that adds to the CSS classes.\r\n
\r\n \t- ng- valid<\/li>\r\n \t
- ng- invalid<\/li>\r\n \t
- ng-pristine<\/li>\r\n \t
- ng-dirty<\/li>\r\n<\/ul>\r\n
\r\n \t- What is the boost process in AngularJS?<\/strong><\/li>\r\n<\/ol>\r\nIf a page is loaded in the browser the following things occur,\r\n
\r\n \t- The HTML document is loaded on the browser and it is evaluated by the browser. The Angular JS JavaScript file is loaded -> angular global object is created. Then, JavaScript that registers the controller function is executed.<\/li>\r\n \t
- Now, the Angular JS scans through HTML to look for the Angular JS apps and views. If the view is located, then it is connected to that view and the corresponding controller function.<\/li>\r\n \t
- The Angular JS executes a controller function. Later it renders views with data from the model that is populated by the controller. Now the page gets ready.<\/li>\r\n<\/ul>\r\n
\r\n \t- Explain the types of Linking functions in detail?<\/strong><\/li>\r\n<\/ol>\r\n
\r\n \t- Pre-Linking function: <\/strong>The Pre-Linking functions are executed before the child elements are linked. Also, this is not considered a safe way for a DOM transformation.<\/li>\r\n \t
- Post-Linking functions: <\/strong>\u00a0These functions are executed after child elements are linked. This is safe to do a DOM transformation by a post-linking function.<\/li>\r\n<\/ul>\r\n
\r\n \t- Elucidate injector in AngularJS?<\/strong><\/li>\r\n<\/ol>\r\nThe injector is the service locator. This is used for retrieving the object instances that are defined by the provider, invoke methods and load modules and instantiate types. In Angular, there is a Single injector for every Angular application and it helps to look up the object instance by its name itself.These are the Common AngularJS Interview Questions that are asked to a fresher in an Interview.\r\n
\r\n \t- What are the characteristics of “Scope”?<\/strong><\/li>\r\n<\/ol>\r\nGiven below are the characteristics of ” Scope”,\r\n
\r\n \t- For observer model mutation the scope provides an APIs($watch)<\/li>\r\n \t
- For propagating any model changes via systems to view from the outside of the Angular realm.<\/li>\r\n \t
- The scope inherits the properties from its parent scope. When providing access to the shared model properties, the scope could be nested to isolate the application components.<\/li>\r\n \t
- The Scope provides a context against which the expressions are evaluated.<\/li>\r\n<\/ul>\r\n
\r\n \t- Write the difference between compile and link in AngularJS?<\/strong><\/li>\r\n<\/ol>\r\n
\r\n \r\n\r\n\r\nCompile Function<\/strong><\/td>\r\nLink Function<\/strong><\/td>\r\n<\/tr>\r\n\r\n| This is used for template DOM manipulation and this collects all the directives.<\/td>\r\n | This is used for registering the DOM listeners as well as the instances of DOM manipulation. If it is executed once then the template has been cloned.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n\r\n \t- Where is Angular is used mainly for?<\/strong><\/li>\r\n<\/ol>\r\nThe Angular is typically used in the development of Single Page Applications(SPA). The Angular provides the set of ready-to-use modules that simplifies the development of the single-page applications. Besides this, it provides features such as built-in data streaming, a modular CLI, and type safety. Generally, the Angular is regarded as the full-fledged web framework.\r\n
\r\n \t- What do you mean by Angular Expressions?<\/strong><\/li>\r\n<\/ol>\r\nThe Angular expressions are the code snippets that are usually placed in the binding like {{expression}} that are similar to JavaScript. Also, these expressions are used in binding application data to HTML Syntax:{{expression}}.\r\n
\r\n \t- What do you mean by a provider in Angular?<\/strong><\/li>\r\n<\/ol>\r\nThe provider is the configurable service in Angular. This is the instruction to a Dependency Injection system which provides information about how to obtain the value for dependency. This is the object that has a $get() method and it is used to create a new instance of the service. The Provider could also contain additional methods and use the $ for registering new providers.\r\n
\r\n \t- Explain briefly about Scope in Angular?<\/strong><\/li>\r\n<\/ol>\r\nScope in the Angular is the object that refers to an application model. This is an execution context for the expressions. The Scopes are arranged in a hierarchical structure that mimics the DOM structure of an application. The Scopes could watch the expressions and propagate the events.\r\n
\r\n \t- What is the step to configure the Angular App(ng-app)?<\/strong><\/li>\r\n<\/ol>\r\nFor setting up the Angular App we should follow a few steps and they are,\r\n
\r\n \t- First, create an angular.module.<\/li>\r\n \t
- The controller would be assigned to that module.<\/li>\r\n \t
- The module would be linked with an HTML template like (UI or View) with the angular app (ng-app).<\/li>\r\n \t
- These HTML templates would be linked with the controller JS with the ng-controller directive.<\/li>\r\n<\/ul>\r\n
\r\n \t- What are Cookies in AngularJS?<\/strong><\/li>\r\n<\/ol>\r\nCookies Stores the data which has to be sent back to a server with some requests. A cookie’s expiration differs on the types and duration set from either the client-side and server-side. The maximum size that could be stored is less than 4KB.\r\n
\r\n \t- What are the types of Directive scopes in AngularJS?<\/strong><\/li>\r\n<\/ol>\r\nThree types of directive scopes are available in Angular JS and they are\r\n
\r\n \t- Parent Scope<\/li>\r\n \t
- Child Scope<\/li>\r\n \t
- Isolated Scope<\/li>\r\n<\/ul>\r\n
\r\n \t- What is Session Storage and Local Storage?<\/strong><\/li>\r\n<\/ol>\r\n
\r\n \t- Session Storage: <\/strong>The data are generally stored for a particular session. Those data would be lost if the browser tab is closed after a particular session. The maximum size that could be stored here is up to 5MB.<\/li>\r\n \t
- Local Storage: <\/strong>The data stored here is with no expiration date. The data could be cleared by JavaScript or by clearing the browser cache. The Storage limit is maximum compared to the session storage and cookie. These are the Basic AngularJS Interview Questions that are asked to a fresher in an Interview. <\/strong><\/li>\r\n<\/ul>\r\n
\r\n \t- Do Angular supports nested controllers?<\/strong><\/li>\r\n<\/ol>\r\nYes. The Angular supports the concepts of nested controllers. The nested controller is required to define a hierarchical manner for using the View.\r\n
\r\n \t- What is the role of $route Provider in AngularJS?<\/strong><\/li>\r\n<\/ol>\r\nThis is a $route provider that helps in navigating between various links\/pages without separately loading the link\/page whenever a user clicks on the link.\r\n\r\nngRoute config() is used for configuring the routeProvider.\r\n
\r\n \t- Write the ways you can communicate between the application modules using the core Angular functionality?<\/strong><\/li>\r\n<\/ol>\r\nGiven below are the common ways for communicating between the application modules and using core Angular functionality\r\n
\r\n \t- Using events<\/li>\r\n \t
- Using services<\/li>\r\n \t
- Assigning models on $rootScope<\/li>\r\n \t
- Directly between controllers [$parent, $$childHead, $$nextSibling.]<\/li>\r\n \t
- Directly between controllers [ControllerAs and other forms of inheritance]<\/li>\r\n<\/ul>\r\n
\r\n \t- What is the basic distinction between $scope and scope?<\/strong><\/li>\r\n<\/ol>\r\nThe $scope is used in Angular JS for achieving dependency injection and the scope is used to link between View (HTML) and Controller(JS).\r\n
\r\n \t- Differentiate between Angular expressions and JavaScript expressions.<\/strong><\/li>\r\n<\/ol>\r\n
\r\n \r\n\r\n\r\nAngular Expressions<\/strong><\/td>\r\nJavaScript functions<\/strong><\/td>\r\n<\/tr>\r\n\r\n| It contains Operators, Literals, and Variables.<\/td>\r\n | It also contains Operators, Literals, and Variables.<\/td>\r\n<\/tr>\r\n | \r\n| Angular Expressions could be written inside the HTML tags.<\/td>\r\n | JavaScript functions could not be written inside the HTML tags.<\/td>\r\n<\/tr>\r\n | \r\n| They usually do not support loops, conditionals, and exceptions.<\/td>\r\n | They support loops, conditionals, and exceptions.<\/td>\r\n<\/tr>\r\n | \r\n| Angular Expressions support filters.<\/td>\r\n | JavaScript Expressions does not support filters.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n\r\n \t- Where could we implement the DOM manipulations in the AngularJS?<\/strong><\/li>\r\n<\/ol>\r\nManipulations of DOM are the directives. Besides, it should not exist in the controller’s services or anywhere else.\r\n
\r\n \t- What is the concept of Scope Hierarchy?<\/strong><\/li>\r\n<\/ol>\r\n$Scope objects in the Angular are organized into a hierarchy and are majorly used by views. This contains a root scope that can further contain scopes which are known as child scopes. Also, one root scope could contain one or more child scopes. Here every view has its own $scope and the variables that are set by the view controller would remain to other controllers.\r\n
\r\n \t- How does the Scope Hierarchy look like?<\/strong><\/li>\r\n<\/ol>\r\nThe Scope hierarchy usually looks like\r\n
\r\n \t- Root $scope<\/li>\r\n \t
- $scope for Controller 1<\/li>\r\n \t
- $scope for Controller 2<\/li>\r\n \t
- ..<\/li>\r\n \t
- $scope for Controller \u2018n\u2019<\/li>\r\n<\/ul>\r\n
\r\n \t- How should we show the scope variable that it should have one-time binding only?<\/strong><\/li>\r\n<\/ol>\r\nFor showing one-time binding we should use “::” before the scope.\r\n
\r\n \t- What is an AOT?<\/strong><\/li>\r\n<\/ol>\r\nAOT acronym stands for the Angular Ahead-of-Time compiler. This is used for pre-compiling application components along with their templates while building process. Angular Applications that are complied with AOT have a smaller launching time. The components of these applications could be executed immediately without the approval of the client-side compilation. The AOT compiler could discard the unused directives and are further thrown out using the tree-shaking tool. These are the Common AngularJS Interview Questions for fresher in an Interview.\r\n
\r\n \t- What is the ng-bind template and ng-non-bindable template?<\/strong><\/li>\r\n<\/ol>\r\nng-bind -templates:<\/strong> This replaces the text content of an element by the interpolation of the template. This contains multiple double curly markups.\r\n\r\n<ANY ELEMENT ng-bind-template= ” {{expression1}} {{expression2}} \u2026 {{expression n}} “> <\/ANY ELEMENT>\r\n\r\nNg-non-bindable: <\/strong>This specifies Angular JS not to compile the content of the HTML element and their child nodes.\r\n\r\n<ANY ELEMENT ng-non-bindable > <\/ANY ELEMENT>\r\n
| | | | | | |