stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Angular exam - with points Flashcards | StudBud
Explore
/
Angular exam - with points
Angular exam - with points
20 terms
·
StudBud Administration
·
23 plays
Now that you've taken the #Angular course, let's see how much you know about the framework!
Flashcards
20 cards
F
Practice quiz
P
Host live
L
Questions
20
Answers
1
How should the input parameter
name
be defined on the component?
@Input() name : string;
@Input name : string;
input : @name : string
[input] : name : string
2
What TypeScript decorator do you use for decorating a Service class?
@Service()
@Inject()
@Injector()
@Injectable()
3
What is an RxJS
Subject
used for?
To implement an independent messagebus (aka PubSub-system)
To listen to Events on a separate service
To publish Events on a separate service
To publish and subscribe to events on a component.
4
1. Application Logic is contained in an @ngModule. 2. We can import modules into other modules.
both are incorrect.
both are correct.
1. is correct, 2. is incorrect
1. is incorrect, 2. is correct
5
What command is used to build a production and distribution version of your app?
ng new <appName> --prod
ng build --dist
ng generate build --prod
ng build --prod
6
I want to use [(ngModel)]. What module must be imported?
FormsModule
ReactiveFormsModule
BrowserFormsModule
ngModule
7
What type(s) of data binding does Angular support?
Attribute binding, Event binding, 2-way binding
Simple binding, Attribute binding, Input binding
Simple binding, Component binding, Event binding
Simple binding, Attribute binding, Event- and 2-way binding
8
How can you generate a new module using the angular-cli?
ng generate new <module-name>
ng g <module-name>
ng g module <module-name>
ng g new <module-name>
9
My application needs to respond to non DOM-events. What TypeScript decorator do I need?
@ChildListener
@Input() and @Output()
@ParentListener
@HostListener
10
Which of the following is
not
a valid TypeScript decorator?
@Output
@Component
@Modules
@Pipe
11
I want to pass a parameter
Id
to a route. What is the correct notation?
{id: 'detail/:id', component: DetailComponent }
{path: 'detail:id', component: DetailComponent }
{path: ':detail/id', component: IdComponent }
{path: 'detail/:id', component: DetailComponent }
12
I have a runtime error message
"...map () is not a function"
. What is the most likely cause?
The .map() function is on the wrong component.
I forgot to declare the .map() function.
I made a typo in my source code.
The .map() operator is not imported.
13
I want to declare and export a routing table. What is the
minimal
import statement I need?
import {Routes} from'@angular/router';
import {Routes, RouterModule} from'@angular/router';
import {Routes, ActivatedRoute} from'@angular/router';
import {RouterModule} from'@angular/router';
14
Angular was originally created by people at...
Apple
Facebook
Google
Microsoft
15
What file is absolutely required for distributing an Angular application?
tsconfig.json
systemjs.config.js
app.component.ts & app.module.ts
package.json
16
What is the correct syntax to setup a new project using the angular-cli?
npm install -g angular-cli
ng generate <application-name>
angular new <application-name>
ng new <application-name>
17
I want to pass the value of a variable
name
in to a component. What is the correct syntax?
<component [name]="name">
<component name=[name]>
<component [name]="{{name}}">
<component (name)=name>
18
What is the current version of Angular?
React 16.5
Angular 5
Angular 3
Who cares...
19
What tool are we currently looking at?
Redux Tools for Chrome
Chrome DevTools Debugging
Angular CLI
Augury
20
How can I set up template binding on a form?
<form novalidate [myForm]="ngForm">
<form novalidate #myForm="ngForm">
<form novalidate #ngForm="myForm">
<form novalidate (myForm)="ngForm">