UNPKG

ace-component

Version:

ace-components for ewms

81 lines (73 loc) 1.35 kB
import { Component } from '@angular/core'; class Setting { path:string; iconClass:string; text:string; } const sideBarSetting:Setting[] = [ { path:'/home', iconClass:'menu-icon fa fa-home', text:'首页' }, { path:'/button', iconClass:'menu-icon fa fa-bomb', text:'按钮' }, { path:'/table', iconClass:'menu-icon fa fa-table', text:'表格' }, { path:'/modal', iconClass:'menu-icon fa fa-dribbble', text:'对话框' }, { path:'/charts', iconClass:'menu-icon fa fa-bar-chart-o', text:'图表' }, { path:'/body', iconClass:'menu-icon fa fa-certificate', text:'容器' }, { path:'/datepicker', iconClass:'menu-icon fa fa-adn', text:'日历' }, { path:'/dropdownselect', iconClass:'menu-icon fa fa-gg', text:'下拉分页' }, { path:'/search', iconClass:'menu-icon fa fa-search', text:'搜索框' }, { path:'/toaster', iconClass:'menu-icon fa fa-bicycle', text:'提示框' } ] @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export class AppComponent { sibarSetting=sideBarSetting; isActive(hash:string){ if(location.href.indexOf(hash)>-1){ return "active" } } ngOnInit(){ } }