@welight/ngx-services
v0.1.0
Published
> Services for Angular to use in Welight projects.
Downloads
5
Keywords
Readme
Welight Services
Services for Angular to use in Welight projects.
Installation
Step 1
npm install @welight/ngx-services
Step 2
Configure AppModule
to use Welight services.
import { WelightServicesModule } from "@welight/ngx-services";
// import environment config
import { environment } from "../environment/environment";
@NgModule({
imports: [
// others modules...
WelightServicesModule.forRoot(environment)
]
})
export class AppModule {}
Usage
import { Component } from "@angular/core";
import { WelightService } from "@welight/ngx-services";
@Component({
selector: "example-component"
})
export class ExampleComponent {
// inject depencie
constructor(private welight: WelightService) {
// code here
}
}