ng new myproject -si --style=scss
生成一个项目,si表示skip install,就是跳过生成项目时的npm自动安装下载一些包,并规定项目中的样式文件格式为scss而非css,这样有利于后期的material ui设计。
用vscode打开项目,在vscode的终端:
cnpm install
ng g m core //生成一个核心模块(m为module)
ng g c core/header //在core文件下生成组件header
ng new myproject -si --style=scss
生成一个项目,si表示skip install,就是跳过生成项目时的npm自动安装下载一些包,并规定项目中的样式文件格式为scss而非css,这样有利于后期的material ui设计。
用vscode打开项目,在vscode的终端:
cnpm install
ng g m core //生成一个核心模块(m为module)
ng g c core/header //在core文件下生成组件header