Angular Revisited 2025

From bibbleWiki
Revision as of 00:41, 19 March 2025 by Iwiseman (talk | contribs) (Created page with "=Introduction= Been a while since I touched Angular except for when I put my loader into WASM. So this page is just to add any changes I have found =CommonModule= The structural directives, e.g. NgFor NgIf not can be import in the component. I guessing the is because of SSR so now we do this <syntaxhighlight lang="ts"> @Component({ selector: 'app-chess-board', imports: [NgFor, NgClass, NgIf], templateUrl: './chess-board.component.html', styleUrl: './chess-board.c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

Been a while since I touched Angular except for when I put my loader into WASM. So this page is just to add any changes I have found

CommonModule

The structural directives, e.g. NgFor NgIf not can be import in the component. I guessing the is because of SSR so now we do this

@Component({
  selector: 'app-chess-board',
  imports: [NgFor, NgClass, NgIf],
  templateUrl: './chess-board.component.html',
  styleUrl: './chess-board.component.css'
})
export class ChessBoardComponent {
...

Assests

These now live in the public directory. I wonder if the is something to copy them from there old haught of src.