SuperITMan links
Tag cloud
Picture wall
Daily
RSS Feed
  • RSS Feed
  • Daily Feed
  • Weekly Feed
  • Monthly Feed
Filters

Links per page

  • 20 links
  • 50 links
  • 100 links

Filters

Untagged links
How Using Angular’s inject() Function Has Saved Me 1000 Lines of Code | by Francesco Borzì | JavaScript in Plain English https://javascript.plainenglish.io/how-using-the-angulars-inject-function-has-saved-me-1000-lines-of-code-82b699183da8
Tue Jun 25 23:53:16 2024
QRCode
cluster icon
  • restic · Backups done right! :
  • Obsidian Starter Course :
  • How to Customize Your Angular Build With Webpack | Okta Developer : Interesting post about the customization of the Angular Build system
  • détecteur présence avec contact libre potentiel pour activer knx (entrée binaire) + RF (commutateur) :
  • Back Up and Share Docker Volumes with This Extension | Docker : When you need to back up, restore, or migrate data from one Docker host to another, volumes are generally the best choice. You can stop containers usi...

The old way of injecting dependencies using the constructor:

import { Component } from '@angular/core';

@Component({ / ... / })
export class MyComponent {
constructor(
@Inject(SOME_TOKEN) private readonly someToken: string,
private readonly myService: MyService,
private readonly httpClient: HttpClient,
) {}
}

The new way of injecting dependencies using the inject() function:

import { Component, inject } from '@angular/core';

@Component({ / ... / })
export class MyComponent {
private readonly someToken = inject(SOME_TOKEN);
private readonly myService = inject(MyService);
private readonly httpClient = inject(HttpClient);
}

2024 angular todo stark
862 links, including 81 private
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Theme by kalvn