现在,我已经成功地将angular 2组件集成到了我们的angularJS应用程序中,我想为这个版本对它们进行美化。但是,如果我使用SystemJS构建器,我会得到以下错误:
Fatal error: ENOENT: no such file or directory, open '{webAppRoot}angular2\angular2.js'
它似乎试图使请求(‘angular2/angular2’)变得丑化,但它没有正确地解决它。如何正确地美化angular2应用程序?
请注意,应用程序的angularJS部分是用ES5、JS和AMD编写的,angular2模块正在使用
我想做e2e测试在Angular2的hello应用程序与规格写成文字记录。然而,量角器崩溃时有以下信息:
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
[launcher] Error: ReferenceError: System is not defined
at Object.<anonymous> (C:\Dev\d2ipm\test\e2e\overview.js:1:1)
at Module._co
我正在使用Protractor测试我的angular应用程序。一旦用户登录到我的应用程序,我就将$timeout设置为在一小时内完成一些工作(因此,如果用户在13:00登录,则$timeout将在14:00运行)。我不断收到这些失败的消息:
"Timed out waiting for Protractor to synchronize with the page after 20 seconds. Please see https://github.com/angular/protractor/blob/master/docs/faq.md. The following tasks
我有一个普通的Angular7项目,它是通过ng CLI生成的,其中有一个组件我想要测试:src/app/mini-cal/mini-cal.component.spec.ts
我不知道有什么方法可以要求有角的cli工具来帮我做这件事,下面的组合失败了
ng test --specs='src/app/mini-cal/mini-cal.component.spec.ts'
ng test -- --specs='src/app/mini-cal/mini-cal.component.spec.ts'
所以我决定把protractor指在下面这样的位置:
pro
我有一个selenium网格,运行着chrome、firefox和android节点
我在一个angular cli项目中有这个量角器配置:
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const {SpecReporter} = require('jasmine-spec-reporter');
var HtmlScreenshotReporter
我想在另一个共享库中使用我的共享库,但是
ERROR: Unexpected value 'LibraryModule in ...' imported by the module 'TestlibModule in ...'. Please add a @NgModule annotation.
库在单独的角度应用程序(test和test2)中。每个应用程序都包含一个库(通过ng生成库生成),我通过运行ng build library_name来构建这个库。
测试应用程序中的库(称为testlib)包括从test2 (称为库)到npm的库。
package.j
当我跑的时候
ng test --watch=false --code-coverage --no-progress
我得到了
Schema validation failed with the following errors:
Data path ".watch" should be boolean.
我搜索了一下,但是找不到这个错误的匹配。
文档()明确表示--watch=false应该可以工作。
其他人说它是有效的,例如
我用的是angular/cli 6.2.4。angular 6.1.9
有没有人遇到过这种情况?
我想用protracor测试我的应用程序,但测试失败,错误如下:
Failed: Error while waiting for Protractor to sync with the page: "root element (html) has no injector. this may mean it is not inside ng-app."
看起来angular不能完全加载,browser.waitForAngular();也不能工作。如何设置量角器以在RequireJs加载依赖项后继续测试?
还添加了以下内容:
onPrepare:function(){
遵循这里描述的基本指南,https://www.npmjs.com/package/ng-mock-e2e
但正常的REST呼叫仍在被调用。
'use strict'
var HttpBackend = require('httpbackend');
var backend = null;
var Injector = require('./helpers/injector');
var ngMockE2E = require('ng-mock-e2e');
var $httpBackend = ngMockE2E.$httpB
我已经在我的angular项目中安装了angular material,但是当我运行该项目时,我得到了这个错误。
ERROR in Metadata version mismatch for module C:/Users/Corandus/code/angular/webapp_2/node_modules/@angular/material/slide-toggle/typings/index.d.ts, found version 4, expected 3, resolving symbol AppModule in C:/Users/Corandus/code/angular/web
我一直在尝试自动化一个案例,在这个案例中,我必须创建一组Urls。因此,在执行以下脚本之后,将添加所需的所有组。在完成所有任务后,它会抛出超时错误。但在其他规范中使用相同的对象时,可以完美地工作。
describe('Test for ToolbarExpandField',function(){
it('Creating a new url group',function(){
emulator.createNewURLGroup(URLGroupName,URLGroupList);
})
})
createNewURLGrou