Put in order · Angular course · Module 1: Introduction to Angular
Order within a component file
Order the elements of a standalone component file (from top to bottom):
Items to put in order
- @Component({ standalone: true, ... })
- import { Component } from '@angular/core';
- export class KatanaComponent {
- }
Show the answer
Correct order:
- import { Component } from '@angular/core';
- @Component({ standalone: true, ... })
- export class KatanaComponent {
- }