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
1 result tagged stark  ✕
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
  • 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) :
  • restic · Backups done right! :
  • Obsidian Starter Course :
  • Backup and Restore of Docker Volumes: A Step-by-Step Guide – Blog – Osmosys Software solutions : As more and more developers turn to Docker to streamline their development processes, it becomes increasingly important to understand how to take back...

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
874 links, including 81 private
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Theme by kalvn