Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Created September 2, 2022 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NetanelBasal/02ab79c17bac59659a071b631fc0c888 to your computer and use it in GitHub Desktop.
Save NetanelBasal/02ab79c17bac59659a071b631fc0c888 to your computer and use it in GitHub Desktop.
export class AppComponent {
private foo = inject(FOO) // typed as string
private bar = inject(BAR, { optional: true }) // typed as string | null
private http = inject(HttpClient) // typed as HttpClient
private todosService = inject(TodosService) // typed as TodosService
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment