Angular Interview Questions and Answers
Question - 51 : - What are templates in AngularJS?
Answer - 51 : - A template is HTML file that is used with AngularJs directives and attributes.
Question - 52 : - What is the Ahead of Time Compilation?
Answer - 52 : - Angular AOT (Ahead of Time) is a compiler that converts your angular HTML and typescript code into the JavaScript code.
Question - 53 : - List types of filters in AngularJS
Answer - 53 : - Types of filters used in AngularJS are:
1) Currency,
2) Uppercase,
3) Lowercase,
4) orderBy,
5) JSON, and
6) limitTo.
Question - 54 : - Explain ngOnInit () function
Answer - 54 : - ngOnInit () function is a lifecycle hook which is called after completion of data-bound properties of the directive.
Question - 55 : - What is transclusion in AngularJS?
Answer - 55 : - The transclusion in AngulaJS enables developers to reallocate the original directive children into a specific location within a template. The directive ng shows the insertion point for a transcluded DOM of the nearest parent directive, which is using transclusion. Ng-transclude-slot or ng-transclude directives are mainly used for transclusion.
Question - 56 : - Lit out hooks are available in AngularJS
Answer - 56 : - Various hooks in AngularJS are:
1) ngOnInit()
2) ngOnChanges(),
3) ngDoCheck(),
4) ngAfterContentInit(),
5) ngAfterContentChecked(),
6) ngOnDestroy(),
7) ngAfterViewChecked(), and
8) ngAfterViewInit()
Question - 57 : - What are the important parts of AngularJS metadata?
Answer - 57 : - AngularJS metadata is used to decorate a class that depicts the expected behavior of a particular class. Various parts of metadata are:
1) class decorator,
2) Method decorators,
3) Parameter decorators, and
4) Property decorators.
Question - 58 : - What is Angular CLI?
Answer - 58 : - Angular CLI is also called as the command line interface tool. It is used to build, initialize, and maintain Angular apps. CLI software can be used through very interactive UI like a command shell or Angular Console.
Question - 59 : - Explain parameterized pipe in AngularJS
Answer - 59 : - In angularJS, pipes can have more than one parameter in order to tune the fine output. You can create a parameterized pipe by declaring the pipe with colon(:) and values of parameter. Developer can separate multiple parameter values with colon(:).
Question - 60 : - What is Routing?
Answer - 60 : - Routing is a method of merging various views. The controller takes the decision to combine these views depend on logical needs.