How to use the @angular/core.Inject function in @angular/core

To help you get started, we’ve selected a few @angular/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dynatrace-oss / barista / src / lib / tabs / tab / tab-body.ts View on Github external
constructor(
    componentFactoryResolver: ComponentFactoryResolver,
    viewContainerRef: ViewContainerRef,
    // tslint:disable-next-line:no-forward-ref
    @Inject(forwardRef(() => DtTabBody)) private _host: DtTabBody,
  ) {
    super(componentFactoryResolver, viewContainerRef);
  }
github SciCatProject / catanie / src / app / shared / sdk / services / custom / Attachment.ts View on Github external
constructor(
    @Inject(HttpClient) protected http: HttpClient,
    @Inject(SocketConnection) protected connection: SocketConnection,
    @Inject(SDKModels) protected models: SDKModels,
    @Inject(LoopBackAuth) protected auth: LoopBackAuth,
    @Optional() @Inject(ErrorHandler) protected errorHandler: ErrorHandler
  ) {
    super(http,  connection,  models, auth, errorHandler);
  }
github vmware / clarity / src / clr-angular / popover / signpost / signpost-trigger.ts View on Github external
constructor(
    private toggleService: ClrPopoverToggleService,
    private el: ElementRef,
    public commonStrings: ClrCommonStringsService,
    private signpostIdService: SignpostIdService,
    private signpostFocusManager: SignpostFocusManager,
    @Inject(DOCUMENT) document: any,
    @Inject(PLATFORM_ID) private platformId: Object
  ) {
    this.document = document;
  }
github Prisma-care / mobile-app / src / app / storyList / component / storyDetail / storyDetail.component.ts View on Github external
constructor(
    @Inject(ConstantToken) private constant: Constant,
    private navParams: NavParams,
    private mixpanel: MixpanelService,
    private sanitizer: DomSanitizer,
    private popoverCtrl: PopoverController,
    private youtube: YoutubeVideoPlayer,
    private storyService: StoryService,
    private patientService: PatientService,
    private navCtrl: NavController,
    private viewCtrl: ViewController,
    public toastCtrl: ToastController
  ) {}
github DSpace / dspace-angular / src / app / submission / sections / license / section-license.component.ts View on Github external
constructor(protected changeDetectorRef: ChangeDetectorRef,
              protected collectionDataService: CollectionDataService,
              protected formBuilderService: FormBuilderService,
              protected formOperationsService: SectionFormOperationsService,
              protected formService: FormService,
              protected operationsBuilder: JsonPatchOperationsBuilder,
              protected sectionService: SectionsService,
              protected submissionService: SubmissionService,
              @Inject('collectionIdProvider') public injectedCollectionId: string,
              @Inject('sectionDataProvider') public injectedSectionData: SectionDataObject,
              @Inject('submissionIdProvider') public injectedSubmissionId: string) {
    super(injectedCollectionId, injectedSectionData, injectedSubmissionId);
  }
github bleenco / abstruse / src / app / components / app-build-details / app-build-details.component.ts View on Github external
constructor(
    private socketService: SocketService,
    private apiService: ApiService,
    private timeService: TimeService,
    private authService: AuthService,
    private route: ActivatedRoute,
    private ngZone: NgZone,
    private router: Router,
    @Inject(DOCUMENT) private document: any,
    private titleService: Title
  ) {
    this.loading = true;
    this.status = 'queued';
    this.currentTime = new Date().getTime();
  }
github lydemann / oidc-angular-identityserver / Solution 6 - OIDC and Angular client / ClientApp / ClientApp / src / app / core / auth / auth.service.ts View on Github external
constructor(
        private oidcSecurityService: OidcSecurityService,
        private http: HttpClient,
        private router: Router,
        @Inject('BASE_URL') private originUrl: string,
        @Inject('AUTH_URL') private authUrl: string,
    ) {
    }
github DSpace / dspace-angular / src / app / +search-page / search-filters / search-filter / search-range-filter / search-range-filter.component.ts View on Github external
constructor(protected searchService: SearchService,
              protected filterService: SearchFilterService,
              protected router: Router,
              protected rdbs: RemoteDataBuildService,
              @Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService,
              @Inject(IN_PLACE_SEARCH) public inPlaceSearch: boolean,
              @Inject(FILTER_CONFIG) public filterConfig: SearchFilterConfig,
              @Inject(PLATFORM_ID) private platformId: any,
              private route: RouteService) {
    super(searchService, filterService, rdbs, router, searchConfigService, inPlaceSearch, filterConfig);

  }