ngx-juggernaut
v2.12.1
Published
<a href="http://www.chemistrymarketing.co.uk/"> <h1 align="center">Chemistry Marketing - Angular 5 Api Module (ngx-juggernaut)</h1> </a>
Downloads
115
Readme
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);
});
}