About 9,040,000 results
Open links in new tab
  1. angular - What does @Injectable mean? - Stack Overflow

    Sep 23, 2019 · Injectable () in the service specifies that this service can be injected/used in other components. In short if service has injectable decorator, other components can use that …

  2. Why do we use @Injectable () decorator , when we can actually …

    The @Injectable () decorator has the providedIn metadata option, where you can specify the provider of the decorated service class with the root injector, or with the injector for a specific …

  3. What is the difference between @Inject and @Injectable in …

    May 19, 2016 · What is the difference between @Inject and @Injectable in Angular 2 typescript Asked 9 years, 5 months ago Modified 7 years, 3 months ago Viewed 28k times

  4. dependency injection - How can I make an Angular service …

    Sep 11, 2024 · I am trying to create a service in Angular that should only be injectable within a specific module, not accessible outside that module. I have a service MyService that I want to …

  5. typescript - What is the purpose of providedIn with the Injectable ...

    Jun 14, 2018 · Injectable is provided - an instance of the Injectable will be given to classes below this specific injector level, whenever they request it. Injectable is injected - a class constructor …

  6. node.js - What is Injectable in NestJS? - Stack Overflow

    Oct 14, 2020 · import { Injectable } from '@nestjs/common'; const userMock = [{ account: 'dung', password: '12345678' }]; @Injectable() export class UserService { getUser() { return userMock …

  7. ngOnInit not being called when Injectable class is Instantiated

    May 27, 2017 · 70 I don't know about all the lifecycle hooks, but as for destruction, ngOnDestroy actually get called on Injectable when it's provider is destroyed (for example an Injectable …

  8. Importing Injectables and Angular Services - Stack Overflow

    Sep 11, 2020 · I am learning about Injectables and Services in Angular and I am not clear about certain importing and default characteristics about injectables. Specifically, when should a …

  9. Flutter Injectable: inject multiple instances of generic types via ...

    Aug 18, 2021 · Flutter Injectable: inject multiple instances of generic types via annotation Asked 4 years, 2 months ago Modified 1 year, 7 months ago Viewed 1k times

  10. Angular 19 - Why is a new @Injectable service created each time

    Jan 11, 2025 · The service is marked as @injectable. I then injected the service into a route guard component. The route guard gets an authentication service object from inject (). I expected …