bang-ng-utils

bang ng utils

Stats

StarsIssuesVersionUpdatedCreatedSize
bang-ng-utils
0.0.153 years ago3 years agoMinified + gzip package size for bang-ng-utils in KB

Readme

bang-ng-utils

use

import {HttpService,DispatchAction,getCookie,setCookie} from 'bang-ng-utils';
new HttpService(this.httpClient).get(url,entity//实体映射类,prams//传递值,headers//自定义头部信息,默认无须设置)
new HttpService(this.httpClient).post(url,entity//实体映射类,prams//传递值,headers//自定义头部信息,默认无须设置)

new DispatchAction<ContainerStore>(this).init(()=>{
            this.test=observablePromise<Hero[]>() //设置初始Pending 用于拆分数据状态,如Pending,resolved等,常见应用场景loading
        }).set(heroService.getHeroes(),(data)=>{heroService.getHeroes()//返回一个Observable  rxjs ,第二个参数成功回调函数  在此我们约定所有服务端数据结构都是从              observablePromise函数出来
            this.test=observablePromise(data)
        });

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.