Giraffe UI
一个Angular的UI组件库
AngularUI Component
npm install grf-ui
环境
environment
Make sure that you have installed the node-sass,if not,please do it.
确定你已经安装了node-sass哦,如果没有的话,
install一下
npm install node-sass
接下来在你的全局样式表中引入组件库的基础样式
Next, introduce the basic style of the component library in your global stylesheet.
@import './../node_modules/grf-ui/sass/app';
引用组件
components
好了,现在来试试看使用组件吧
OK, now try to use it
import { CardModule } from 'grf-ui';
import { InputModule} from 'grf-ui';
@NgModule({
declarations: [
...
],
imports: [
BrowserModule,
BrowserAnimationsModule,
CardModule,
InputModule
],
<grf-card>
<input type="text" grf-input>
</grf-card>
一切正常!开始使用吧
可能会出现的问题
如果引用组件之后出现StaticInjectionError的错误,不要着急,删掉grf-ui里的node-module再重启项目试试看