@@ -50,8 +50,8 @@
- -
- {{log}}
+
-
+ {{log.text}}
\ No newline at end of file
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 78b85ad..ad31e1e 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -31,7 +31,10 @@ export class AppComponent implements AfterViewInit{
overrideConsole(){
this.iframe.nativeElement.contentWindow.console.log = (log:any)=>{
- this.logs.push(log);
+ this.logs.push({
+ "text":log,
+ "type":"log"
+ });
}
}
diff --git a/src/app/editor/editor.component.html b/src/app/editor/editor.component.html
index 1c0733b..ff68941 100644
--- a/src/app/editor/editor.component.html
+++ b/src/app/editor/editor.component.html
@@ -1,6 +1,7 @@
+[mode]=mode
+[options]="options">
\ No newline at end of file
diff --git a/src/app/editor/editor.component.ts b/src/app/editor/editor.component.ts
index c5371a0..c529f02 100644
--- a/src/app/editor/editor.component.ts
+++ b/src/app/editor/editor.component.ts
@@ -1,18 +1,22 @@
import { Component, OnInit, EventEmitter } from '@angular/core';
-import { Input,Output } from '@angular/core';
+import { Input,Output, AfterViewInit } from '@angular/core';
@Component({
selector: 'app-editor',
templateUrl: './editor.component.html',
styleUrls: ['./editor.component.css']
})
-export class EditorComponent implements OnInit {
+export class EditorComponent implements OnInit,AfterViewInit {
@Output('contentChange') contentEvent:EventEmitter
= new EventEmitter();
@Input('mode') mode:any;
@Input('content') content:any;
+ options:any = {};
- constructor() { }
+
+ ngAfterViewInit() {
+ this.options.enableBasicAutocompletion = true;
+ }
ngOnInit() {
}