Welcome Guest! (App Version 3.1)

websitnero logo name

Angular Quiz 1

Q1: Which is the correct sequence for component life-cycle hooks?

ngDoCheck(), ngAfterContentChecked(), ngAfterViewInit()

ngDoCheck(), ngAfterContentChecked(), ngAfterViewInit()

ngDoCheck(), ngAfterViewInit(), ngAfterContentChecked()

ngAfterContentChecked(), ngDoCheck(), ngAfterViewInit()

Q2: Which of the following is not a valid 'Component life-cycle' hook?

ngAfterViewChecked()

ngOnDestroy()

ngAfterComponentUpdate()

ngOnChanges()

Q3: Which type of form is helpful in writing test cases?

template-driven form

reactive form

simple form

both 1 & 2

Q4: On creating a component via 'angular-cli' how many files will be generated?

1

2

3

4

Q5: Which of the following statements are true?

webpack compiles ES6 code to ES5

components can be reused

Modules are ES6 concept

fat arrow function is faster than vanilla js function

Q6: Which of the following are valid angular modules?

BrowserModule

FormsModule

HttpModule

NgModule

Q7:Which of the following is/are not a valid code by Angular-CLI?

ng g directive directives/someDirective

ng g enum enum/someEnum

ng g pipe pipes/somePipe

ng g model models/someModel

Q8: Which terms are NOT related to Angular 2 and subsequent versions?

Factory

Service

Module

$scope

Q9: Which of the following best helps in sharing data from parent to child?

@Input

@Output

Event-Emitter

String Interpolation

Q10: Which of the following helps in implementing routing in Angular?

routerLink

routerLinkActive

routerUrl

RouterModule.forRoot

Q11: Which of the following is a structural directive?

ngIf

ngSwitch

ngModel

ngSwitchDefault

Q12: Whcih of the following files are part of angular-project when boilerplate code is created by Angular-CLI?

package.json

tslint.json

angular.json

eslint.json

Q13: What is the syntax to build the project and get compiled files in the 'dist' folder?

ng build

ng compile

ng run build --prod

node compile --dist

Q14: Which of the following are valid examples of 'Element Directives'?

ng-content

ng-template

ng-module

Components

Q15: Which of the following are valid parameters while declaring @component directive?

encapsulation

preserveWhitespaces

styleUrls

templateUrl

Q16: Which of the following is correct syntax?

@Output() someEmitter = new EventEmitter;

@Output someEmitter = new EventEmitter();

@Output() someEmitter = new EventEmitter();

@Output someEmitter() = new EventEmitter();

Q17: Which of the follwing syntax is NOT correct?

import { BrowserModule } from '@angular/core';

import { NgModule } from '@angular/module';

import { FormsModule } from '@angular/forms';

import { Component, OnInit } from '@angular/core';

Q18: Which of the following is/are correct syntax?

{{amount | currency:'CAD':'symbol':'4.2-2'}}

{{amount | currency:'CAD':'symbol-narrow':'4.2-2'}}

{{amount | currency:'CAD':'symbol':'4.2-2':'fr'}}

{{amount | currency }}

Q19: Which of the following are valid pipes of Angular?

AsyncPipe

JsonPipe

SlicePipe

DecimalPipe

Q20: By which process ES6 code is converted to ES5?

Compilation

Conversion

Transpilation

Interpretation

Q21: Which directive can be used to enter custom text (which is not replaced or over-written) while adding components to a file?

ng-insert

ng-content

ng-customized

ng-protect

Q22: Which of the following is not a valid property of 'ViewEncapsulation'?

Emulated

Native

None

Global

Q23: Which of the following terms is linked to Dependency Injection?

Providers

Transpilers

Constructors

ngOnInit

Q24: Which of the following is true about 'HttpInterceptor'?

It helps in authorization of end-user.

It helps in intercepting data while passing from service to components

It helps attaching JSON Web token to http requests

It helps in implementation of $http and Observables

Q25: Which of the following statements are true?

Promises return only one value on execution

Observables have better use case when a stream of data is coming over the time

It is always advisable to use Observables over Promises

Observables get edge as they have 'retry' option which promises missed

WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.