Professional Documents
Culture Documents
Which scripting language can be used to write Angular2 apps? TypeScript or JavaScript
Which is not true about Angular2? Angular2 extensively uses $scope object to implement MV* pattern
What is it called, when you "compile the applicaton as part of the build process"?Ahead-of-Time(AOT)
Compilation.
What are the types of Angular View Classes that can be associated to a Module?Components, Directives
and Pipes
The @Component decorator defines how an application should be compiled and launched.F
What is it called, when you "compile the application in the browser before launching the app"?Just-In-
Time(JIT) Compilation
Select the correct Component Lifecycle sequence (Note: Not all Lifecycles methods are present).
ngOnChanges() -> ngOnInit() -> ngDoCheck() -> ngAfterContentChecked() -> ngAfterViewInit() ->
ngOnDestroy()
How many lifecycle methods does Angular offer apart from a Component's construtor()?8
A _______ acts as a mediator between application / business logic and the application presentaion
layer.Component
element property is used to tell angular to insert the instance of component in the HTML file.selectors.
Multiline template should be included within ....
Templates can also be added using URLs of the file containing code.T
Which of the following is the correct usage of template syntax?<li (click)="selectHero(hero)" *ngFor="let
hero of heroes"></li>
What does the following code demonstrate?<input #empId placeholder="Enter your TCS employee id"
required> Use of Template Reference Variables
<tr>
</td>
</tr>`The <td > A template parse error is thrown since colspan is a native HTML attribute
Consider following code.<p class="bold text-center"> {{data.userName}} </p>The data object is fetched
from a service and turns out to be null. In such a case, how can you ensure that the app doesn't crash or
log any errors<p class="bold text-center"> {{data?.userName}} </p>
Which of the following helps you define Metadata for a class?Using Decorator
Which of the following correctly represents one-way data binding, from view to source?<button (click)
="buttonClicked()">Click Me!</button>
In-order to bind data from view to component class you can use event binding
Which of the following correctly represents one-way data binding, from source to view <fresco-quiz
[quizId]="frescoId"></fresco-quiz>
Which directive lets you change the rendered view by adding and removing elements from the
Document Object Model?Structural
What happens to the <div> element once application is launched? <div *ngIf="servePie"> Pie Chart –
Sales Projection ..... </div>If 'servePie' evaluates to false, the element is destroyed from the DOM
Which of the following is not true about Services?Services are designed to do a lot of things at one time