2.12.1 • Published 7 years ago
ngx-juggernaut
Licence
MIT
Version
2.12.1
Deps
1
Size
171 kB
Vulns
0
Weekly
0
Chemistry Marketing - Angular 5 Api Module (ngx-juggernaut)
For use with the chemistry marketing API.
Table of contents
Getting Started
ngx-juggernaut is the core module to access the chemistry marketing API via an Angular 5 service.
Installation Instructions
Install ngx-juggernaut from npm
npm install ngx-juggernaut --save
Post Install Setup
Before you can use the API Service you import the Api Module which contains the API Service:
imports: [
ApiModule
]
To use the API Service you need to add it to your module in the providers array:
providers: [
ApiService
]
Example Requests
You can list the available modules by using the getRoutes method:
constructor(private apiService: ApiService,) {
this.apiService.getRoutes().subscribe((routes: Routes) => {
console.log('routes', routes);
}, (error) => {
console.log(error);
});
}
You can get the available methods on a module with the following:
constructor(private apiService: ApiService) {
this.apiService.getModule('commerce').subscribe((response) => {
console.log('response', response);
}, (error) => {
console.log(error);
});
}