@rebolon/ngx-dummy
v0.0.2
Published
This dummy library is only for example for this issue : https://stackoverflow.com/questions/78188272/angular-libraries-that-expose-a-service-requiring-environment-error-error-ng0
Downloads
1
Readme
@rebolon/ngx-dummy
This dummy library is only for example for this issue : https://stackoverflow.com/questions/78188272/angular-libraries-that-expose-a-service-requiring-environment-error-error-ng0
installation
npm install @rebolon/ngx-dummy
usage
- you can setup your dummy content in your environments files.
Just add a
dummy
property to your environment and add a list of key/value like this :
{
dummy: {
"title": "hello",
"content": "world",
}
}
- in your module inject environment like this :
import { environment } from 'PATH_TO/environment.ts'
...
providers: [
{
provide: NG_DUMMY_ENVIRONMENT_TOKEN,
useValue: environment
}
]
- or in your bootstrap file (or components) if you are in Standalone application, like this :
providers: [
{
provide: NG_DUMMY_ENVIRONMENT_TOKEN,
useValue: environment
},
NgDummyService,
],