Show List
Quiz - Angular - 4
Select the right answer for below questions:
What is the syntax for creating a component in Angular?
component componentName { ... }
@component componentName { ... }
@Component({ ... }) componentName { ... }
component @Component({ ... }) componentName { ... }
@Component({ ... }) componentName { ... }
What is the syntax for creating a directive in Angular?
directive directiveName { ... }
@directive directiveName { ... }
@Directive({ ... }) directiveName { ... }
directive @Directive({ ... }) directiveName { ... }
@Directive({ ... }) directiveName { ... }
What is the syntax for creating a service in Angular?
service serviceName { ... }
@service serviceName { ... }
@Injectable({ ... }) serviceName { ... }
service @Injectable({ ... }) serviceName { ... }
@Injectable({ ... }) serviceName { ... }
What is the syntax for bootstrapping an Angular application?
bootstrap(AppModule);
bootstrap(AppComponent);
AppModule.bootstrap();
AppComponent.bootstrap();
bootstrap(AppModule);
What is the syntax for defining a route in the Angular Router?
{ path: 'path', component: ComponentName }
{ route: 'path', component: ComponentName }
{ url: 'path', component: ComponentName }
{ link: 'path', component: ComponentName }
{ path: 'path', component: ComponentName }
What is the syntax for navigation with the Angular Router?
this.router.navigate(['path']);
this.router.go(['path']);
this.router.move(['path']);
this.router.jump(['path']);
this.router.navigate(['path']);
What is the syntax for using a pipe in Angular?
{{ value | pipeName }}
{{ value || pipeName }}
{{ value ? pipeName }}
{{ value ** pipeName }}
{{ value | pipeName }}
What is the syntax for using a custom pipe in Angular?
@Pipe({ ... }) class PipeName { ... }
@pipe({ ... }) class PipeName { ... }
Pipe({ ... }) class PipeName { ... }
pipe({ ... }) class PipeName { ... }
@Pipe({ ... }) class PipeName { ... }
What is the syntax for using a structural directive in Angular?
directiveName-if="condition"
directiveName:if="condition"
directiveName=if="condition"
*directiveName="condition"
*directiveName="condition"
What is the syntax for using a custom directive in Angular?
@Directive({ ... }) class DirectiveName { ... }
@directive({ ... }) class DirectiveName { ... }
Directive({ ... }) class DirectiveName { ... }
directive({ ... }) class DirectiveName { ... }
@Directive({ ... }) class DirectiveName { ... }
Submit
Retry
{"qz1-939374":"@Component({ ... }) componentName { ... }","qz1-939375":"@Directive({ ... }) directiveName { ... }","qz1-939376":"@Injectable({ ... }) serviceName { ... }","qz1-939377":"bootstrap(AppModule);","qz1-939378":"{ path: 'path', component: ComponentName }","qz1-939379":"this.router.navigate(['path']);","qz1-939380":"{{ value | pipeName }}","qz1-939381":"@Pipe({ ... }) class PipeName { ... }","qz1-939382":"*directiveName=\"condition\"","qz1-939383":"@Directive({ ... }) class DirectiveName { ... }"}
Leave a Comment