Author Archives: kevinw8801
order review & refund
only people purchased can give review can they review only once? yes, how to make sure they can review only once? shall show previous review? max interval to review? separate ui to review? yes, do not make everything together order … Continue reading
how to know the bootstrap version in angular-cli
open the following file “../node_modules/bootstrap/dist/css/bootstrap.css”, can find the following from the header of the file /*! * Bootstrap v4.0.0-alpha.6 (https://getbootstrap.com) * Copyright 2011-2017 The Bootstrap Authors * Copyright 2011-2017 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ /*! normalize.css v5.0.0 … Continue reading
install bootstrap with angular-cli
https://github.com/angular/angular-cli/wiki/stories-include-bootstrap Include Bootstrap Bootstrap is a popular CSS framework which can be used within an Angular project. This guide will walk you through adding bootstrap to your Angular CLI project and configuring it to use bootstrap. Using CSS Getting Started … Continue reading
add child to a route
use {path:’xx’, component:xxx, children:[{…}]} the {path:’xx’, loadChildren:’…’} will not make it children, instead it will be the peer prefix based matching – it will match the url segment 1 by 1
apply custom pipe to whole app
create the pipe create a module and import/export the pipe import { KeysPipe } from ‘../keys.pipe’; @NgModule({ imports: [ CommonModule ], declarations: [KeysPipe], exports: [KeysPipe] }) for each app module, import the pipe module import { CpipeModule } from ‘app/util/cpipe/cpipe.module’; … Continue reading
support IE
go to polyfills.ts and uncomments those lines for IE /** IE9, IE10 and IE11 requires all of the following polyfills. **/ // import ‘core-js/es6/symbol’; // import ‘core-js/es6/object’; // import ‘core-js/es6/function’; // import ‘core-js/es6/parse-int’; // import ‘core-js/es6/parse-float’; // import ‘core-js/es6/number’; // … Continue reading
config & service for each module or for app?
config does each module need it’s own config? the routing is for its own
dynamically load all component or not?
benefit fully configurable easy for change problem where to put the component logic? not able to use the good editor not efficient for programming => how many changes can happen? is it frequent? not many changes the build will go … Continue reading
ds for menu
ds label code parent (level) path parameter data component loadChildren canLoad queryParams children how to format the configuration? how is the label translated? code style camel dash convert code from label? replace space with “-“ all low case?
整合angular-cli 和 nodejs express
use angular-cli to dev the angular project -> build the project -> copy the html file & js files to the express project folders in nodejs express project, app.js //app.set(‘view engine’, ‘jade’); app.engine(‘html’, require(‘ejs’).renderFile); app.set(‘view engine’, ‘html’); … //app.use(express.static(path.join(__dirname, ‘public’))); … Continue reading