각도 2 (2.0.0 릴리스), 각도 -cli (1.0.0-beta.14)를 사용하여 앱을 개발하고 있습니다.에이스 편집기 + 각도 2 => 각도기가 동기화 할 수 없습니다
나는 즉시 에이스 편집기가 인스턴스화으로 https://github.com/fxmontigny/ng2-ace-editor
을 다음 각도이 지시어를 사용하여 에이스 편집기를 통합 한, 각도기는 더 이상 동기화 할 수 없습니다 :
✗ 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
}
}
어떤 점이 좋을까요?
에이스 에디터가 인스턴스화 된 것처럼 보이지만 Angular는 더 이상 준비가되어 있지 않다는 것을 알 수 있습니다 : window.getAngularTestability ($ ('app-root')). whenStable (function() {console.log ('stable')})'더 이상 아무것도 인쇄하지 않습니다. – rcomblen