ng new angular2_hello_world 自动创建一个angular工程
创建工程的过程可能耗时较长,可以使用 --skip-install先跳过插件安装,后续使用npm install安装
ng generate component hello-world 创建一个component
ts中会对声明的变量进行初始化检查。使用@Input输入的等类型的变量如果不设置初始化值需要关闭
ts的代码强制检查和tsconfig.json中的compilerOptions-> strictPropertyInitialization : false。