Put in order · Angular course · Module 2: Components
Summary: Component Syntax
Arrange the main parts of a component file in their typical order (top to bottom):
Items to put in order
- import { Component } from '@angular/core';
- @Component({ ... })
- }
- export class SamuraiComponent {
- // properties and methods
Show the answer
Correct order:
- import { Component } from '@angular/core';
- @Component({ ... })
- export class SamuraiComponent {
- // properties and methods
- }