Angular2: inject server side config into service

前端 未结 3 1611
北荒
北荒 2021-01-27 01:27

I\'m using Angular 2.0.0 with TypeScript in ASP.NET Core. My goal is to create AppConfig service in my app, based on server-side variables. With a help from few other answers, I

3条回答
  •  心在旅途
    2021-01-27 01:57

    Your AppConfig provider in @NgModule() shadows the provider passed to bootstrapModule()

    With How to pass parameters rendered from backend to angular2 bootstrap method you should get what you want.

提交回复
热议问题