Skip to content

ShuyunFF2E/ccms-sdk

Repository files navigation

ccms sdk

Build Status npm version npm downloads coverage

How To Use

Install

npm i ccms-sdk --save

Usage

ES6 (直接使用包模块)

import angular from 'angular';
import tokenRefreshInterceptor from 'ccms-sdk/interceptors/token-refresh-interceptor';

angular.module('app', [])
	.config(['$httpProvider', $httpProvider => $httpProvider.interceptors.push(() => tokenRefreshInterceptor)])

ES5 (依赖 ccms.sdk 模块)

<script src="../node_modules/ccms-sdk/es5/ccms-sdk.js"></script>
angular.module('app', ['ccms.sdk'])

API