ng serve --prod
lib项目中的example调试时要加上--prod参数,使得开发环境和生产环境保持一致
Please add a @NgModule annotation.
使用ng-packagr打包时export需要加上index
// previousexport * from './src'// nowexport * from './src/index'
在源代码中导入源代码文件时要指定文件名
// previousimport { Comp } from '../comp';// nowimport { Comp } from '../comp/comp.component';
since the query selector wasn't defined.
使用viewChild时加上forwardRef
// previous@ViewChild(SelectComponent)compSelect: SelectComponent;// nowimport { forwardRef } from '@angular/core';@ViewChild(forwardRef(() => SelectComponent))compSelect: SelectComponent;
