cz-angular
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

Cz-Angular

This project was generated with Angular CLI version 8.1.0.

Components

<cz-empty-page [src]="" [width]="100%" [height]="100%">
<cz-error-page [src]="" [width]="100%" [height]="100%">

Services

AuthService LocalStorageService CookieService

Interceptors

Http Interceptors Logging Interceptors

Imports

import { EmptyPageComponent, ErrorPageComponent, SpinnerComponent } from 'cz-angular';
import { HttpInterceptor, LoggingInterceptor, HttpRequestManager } from 'cz-angular';
import { AuthService, CookiesService, LocalStorageService } from 'cz-angular';

##Http Interceptor Http Interceptor accept custom header config object like this
config { 'Authorization': string, 'Content-Type' : string, 'Accept' : string }
by default it acccept Authorization token from Cookie Service getCookie('token') method. first you have set token in cookie by using setCookieData('token','token') method.
Content-Type is Applicatin/json and Accept type is application/json and you can override this config by passing your config object in Authservice setheaderConfig method.

##HttpRequestManager Use HttpRequestManager for any http request
get(url,httpOptions?)
post(url, body, httpOptions?)
put(url, body, httpOptions?)
delete(url , httpOptions?)

##HttpOptions Structure Import HttpHeader
httpOptions = { headers: new HttpHeaders({ 'Content-Type':'application/json', 'Accept': 'application/json' }) }

##Note To use HttpRequestManager import httpclientModule in app.module.ts and also include in NgModule.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.80latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.80
1.0.70
1.0.60
1.0.50

Package Sidebar

Install

npm i cz-angular

Weekly Downloads

0

Version

1.0.8

License

none

Unpacked Size

369 kB

Total Files

56

Last publish

Collaborators

  • daftpung