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

1.0.5 • Public • Published

Cz-Angular-Core

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-module';
import { HttpInterceptor, LoggingInterceptor } from 'cz-angular-module';
import { AuthService, CookiesService, LocalStorageService } from 'cz-angular-module';

##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' }) }

Readme

Keywords

none

Package Sidebar

Install

npm i cz-angular-core

Weekly Downloads

1

Version

1.0.5

License

none

Unpacked Size

363 kB

Total Files

56

Last publish

Collaborators

  • daftpung