ng2-smart-table 源码:ng2-smart-table
第一步:创建新项目,用来做demo
步骤一:创建新项目
ng new demo-ng2-smart-table
步骤二:下载依赖包
npm i
步骤三:下载ng2-smart-table 及相关的依赖项
npm install ng2-smart-table --save
npm install ng2-completer --save
npm install rxjs-compat --save
第二步:在demo中使用ng2-smart-table
步骤一:创建localsource组件和serversource组件
ng g c demoLocalSource
ng g c demoServerSource
步骤二:添加路由 app-routing.module.ts
import { ExtraOptions, RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';
import { DemoLocalSou