@abbica/charts 中文文档教程
abbica-charts - Abbica charts library
Demo
在 https://solloviovo.github.io/abbica-charts 查看所有正在运行的指令
Dependencies
- Angular (requires Angular 2 or higher, tested with 2.0.0)
Installation
通过 npm 安装上述依赖项。
现在通过以下方式安装@abbica/charts
:
npm install --save @abbica/charts
SystemJS
注意:如果您正在使用
SystemJS
,您应该调整您的配置以指向UMD 包。 在你的 systemjs 配置文件中,map
需要告诉系统加载器在哪里寻找@abbica/charts
:
map: {
'@abbica/charts': 'node_modules/@abbica/charts/bundles/charts.umd.js',
}
安装后你需要导入主模块:
import { LibModule } from '@abbica/charts';
唯一剩下的部分是列出您的应用程序模块中导入的模块。 具体方法会略 对于根(顶级)模块不同,您最终应该得到类似于(注意 LibModule .forRoot()
)的代码:
import { LibModule } from '@abbica/charts';
@NgModule({
declarations: [AppComponent, ...],
imports: [LibModule.forRoot(), ...],
bootstrap: [AppComponent]
})
export class AppModule {
}
应用程序中的其他模块可以简单地导入 LibModule< /code>:
import { LibModule } from '@abbica/charts';
@NgModule({
declarations: [OtherComponent, ...],
imports: [LibModule, ...],
})
export class OtherModule {
}
Usage
License
版权所有 (c) 2017 Oleksandr Soloviov。 根据麻省理工学院许可证(麻省理工学院)获得许可
abbica-charts - Abbica charts library
Demo
View all the directives in action at https://solloviovo.github.io/abbica-charts
Dependencies
- Angular (requires Angular 2 or higher, tested with 2.0.0)
Installation
Install above dependencies via npm.
Now install @abbica/charts
via:
npm install --save @abbica/charts
SystemJS
Note:If you are using
SystemJS
, you should adjust your configuration to point to the UMD bundle. In your systemjs config file,map
needs to tell the System loader where to look for@abbica/charts
:
map: {
'@abbica/charts': 'node_modules/@abbica/charts/bundles/charts.umd.js',
}
Once installed you need to import the main module:
import { LibModule } from '@abbica/charts';
The only remaining part is to list the imported module in your application module. The exact method will be slightly different for the root (top-level) module for which you should end up with the code similar to (notice LibModule .forRoot()
):
import { LibModule } from '@abbica/charts';
@NgModule({
declarations: [AppComponent, ...],
imports: [LibModule.forRoot(), ...],
bootstrap: [AppComponent]
})
export class AppModule {
}
Other modules in your application can simply import LibModule
:
import { LibModule } from '@abbica/charts';
@NgModule({
declarations: [OtherComponent, ...],
imports: [LibModule, ...],
})
export class OtherModule {
}
Usage
License
Copyright (c) 2017 Oleksandr Soloviov. Licensed under the MIT License (MIT)