Angular Intro

Ace your homework & exams now with Quizwiz!

Which of the following is the correct usage of template syntax?

< li (click)="selectHero(hero)" *ngFor="let hero of heroes">< /li>

Which of the following correctly represents one-way data binding, from view to source?

<button (click)="buttonClicked()'>Click Me!</button>

Which of the following correctly represents two-way data binding?

<input type="password" [(ngModel)]="userPwd" required>

Consider the 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 does not crash or log any errors?

<p class="bold text-center" {{data.userName != null }}</p> ??

The following are all Angular metadata Decorators, except ________

@Bindable

The decorator that is used to indicate a module is _______.

@NgModule

Services are identified using the decorator ______.

@injectable

The following are all metadata, except ________

@template

What happens when the following code is encountered by Angular? <tr> <td id="tableData4" colspan={{2 * 2}}> </td> </tr>`

A template parse error is thrown since colspan is a native HTML attribute

Which of the following are valid metadata properties?

All the options

The following are true about Angular 2, except ________

Angular 2 extensively uses $scope object to implement MV* pattern

Root module class by convention is named as _______.

AppModule

A _______ acts as a mediator between application/business logic and the application presentation layer.

Component

What are the types of Angular View Classes that can be associated to a Module?

Components, Directives, pipes

Angular 2 uses ______ Dependency Injection.

Hierarchical

What is it called when you "compile the application in the browser before launching the app"?

Just-in-time (JIT) compilation

The following are all Directives, except __________

Module

______ element property is used to tell angular to insert the instance of component in the HTML file.

Selectors

Which directive lets you change the rendered view by adding and removing elements from the Document Object Model?

Structural Directive

______ are mandatory parameter in components.

Templates

Everything in Angular 2 is a simple class, until you declare metadata.

True

Templates can also be added using URLs of the file containing code.

True

There can be only one component per DOM element.

True

Which scripting language can be used to write Angular 2 apps?

TypeScript or JavaScript

Property binding is defined using _________.

[ ]

Two way binding is done using ________.

[( ngModule )]

Which directive lets you modify the behavior of another Directive?

attribute

Angular 2 is written on top of Angular 1.5.x.

false

There can only one service in a component

false

What happens to the <div> element once the application is launched? <div *ngIf="servePie"> Pie Chart - Sales Projection ..... </div>

if 'servePie' evaluates to false, the element is hidden from view but persists in the DOM

Services are included in components using ______.

provider

directives quiz below

score 3/4

quiz below: Data Binding

score 3/4

Metadata quiz below

score 4/4

Services Quiz below

score : 4/4

next quiz starts below: Quiz Angular Modules

score of below 4: 4/4

next quiz includes the below: quiz templates

score: 3/4

next quiz includes the below 4 : Quiz Components

score: 4/4

The following are true about Services, except ________

services are designed to do a lot of things at a time

Which of the following is an advantage of lazy loading?

speeds up application load time


Related study sets

Psychology Ch. 3d Smell, Taste, Touch: The Chemical and Skin Sense

View Set

Info Tech Systems in Supply Chain Exam 1

View Set

Glencoe Math accelerated: a pre algebra program Chap. 4 vocab

View Set

Chapter 40: Fluid, Electrolyte, and Acid-Base Balance

View Set

Inventory and Inventory Classification

View Set