我使用angular schematics cli创建了一个简单的新示意图。此示意图接受名称作为输入,并在树中生成一个文件。我的files/目录如下所示: src/
app/
__name@dasherize__.ts 我已经构建了它,然后创建了一个新的angular项目: ng new test-app --routing --style css 然后,我cd进入test-app目录,并链接到我的示例示意图: npm link ../schematics/sample-schematic 然后我运行我的原理图: ng g sample-schematic:sample 然而,当
我尝试在我的应用程序中使用,但是我的设置没有成功,即使它在中工作,在我的应用程序中,我使用的是角-cli和角2.rc-1。
复制步骤:
ng new newAppName
cd newAppName
ng serve
那就行了。
npm i qrcode-generator // (note this is missing the svg support).
ng serve // still work
然后在2个文件中更改配置。角-cli-build.js:
var Angular2App = require('angular-cli/lib/broccoli/angular2-ap
我有一个项目,是在很长一段时间前创建的,没有使用角CLI工具。最近,我一直在尝试改进我的应用程序中的负载性能,我想看看是否可以使用CLI下的优化工具,所以我用npm安装了它。当尝试运行命令"ng build“时,我得到以下错误:The build command requires to be run in an Angular project, but a project definition could not be found.
角度CLI是否要求在工具下创建应用程序?我一直在使用package.json来定义我的角度应用程序,但是我看到有人提到在cli中使用angular.jso
我正在用NativeScript构建一个全新的应用程序,但我在使用原生脚本cli创建组件/服务/等时遇到了问题。我只是一直在说:
Error: Invalid rule result: Instance of class Promise.
at t.project (/usr/local/lib/node_modules/nativescript/node_modules/@nativescript/schematics-executor/dist/index.js:250:1038)
...
我检查了这类错误,修复方法是拥有相同版本的@angular/cli和@schematics/
我想要创建一个简单的组件并将其包含在页面中。我用ionic g component my-header (离子-cli v3 beta)创建了它,修复了IonicPageModule错误,然后添加到另一个页面。然后我得到这个错误:
Error: Uncaught (in promise): Error: Template parse errors:
'my-header' is not a known element:
1. If 'my-header' is an Angular component, then verify that it is part o