角度2(2.0.0リリース)、角度-cli(1.0.0-beta.14)を使用してアプリケーションを開発しています。エースエディタ+角度2 =>分度器が同期できない
私はできるだけ早くエースエディタがインスタンス化されるようhttps://github.com/fxmontigny/ng2-ace-editor
を以下の角度2ディレクティブを使用してエースエディタを統合した、分度器はもう同期できません。
✗ should display app name
- Failed: Timed out waiting for Protractor to synchronize with the page after 11 seconds. Please see https://github.com/angular/protractor/blob/master/docs/faq.md
While waiting for element with locator - Locator: By(css selector, app-root .navbar a.active)
エースエディタを使用してインスタンス化されます。
import { EventEmitter, Output, ElementRef, Input, Directive } from '@angular/core';
import 'brace';
import 'brace/theme/chrome';
import 'brace/mode/html';
declare var ace: any;
@Directive({
selector: '[aceEditor]'
})
export class AceEditorDirective {
editor: any;
constructor(elementRef: ElementRef) {
let el = elementRef.nativeElement;
this.editor = ace['edit'](el); // Comment this line and Protractor works again
}
}
何が問題なのですか?
Ace Editorがインスタンス化されたときのように見えますが、Angularは準備ができていることをもう分かりません:window.getAngularTestability($( 'app-root'))。whenStable(function(){console.log( 'stable')} ) 'は何も印刷しません。 – rcomblen