Skip to content

Commit

Permalink
added semicolon
Browse files Browse the repository at this point in the history
  • Loading branch information
SANTOSH committed Oct 13, 2017
1 parent c89fc9a commit 8722cba
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
11 changes: 11 additions & 0 deletions src/app/app.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,15 @@ iframe{
}
.no-border-bottom{
border-bottom: none;
}
.console ul{
padding:0px;
margin: 0px;
list-style-type: none;
}
.console ul li{
border-top:1px solid #eee;
}
.console ul li.log{
color:#111;
}
6 changes: 3 additions & 3 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div>
<div class="action-buttons">
<button class="btn btn-primary" (click)="run()">Run</button>
<button class="btn btn-primary" (click)="run()">Save</button>
<!-- <button class="btn btn-primary" (click)="run()">Save</button> -->
</div>
<div class="table">
<div class="row">
Expand Down Expand Up @@ -50,8 +50,8 @@
</div>
<div class="console">
<ul>
<li *ngFor="let log of logs">
{{log}}
<li class="{{log.type}}" *ngFor="let log of logs">
{{log.text}}
</li>
</ul>
</div>
5 changes: 4 additions & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
});
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/app/editor/editor.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<ace-editor (textChanged)="contentChange()"
[theme]="'eclipse'"
[(text)]="content"
[mode]=mode >
[mode]=mode
[options]="options">

</ace-editor>
10 changes: 7 additions & 3 deletions src/app/editor/editor.component.ts
Original file line number Diff line number Diff line change
@@ -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<any> = new EventEmitter();
@Input('mode') mode:any;
@Input('content') content:any;

options:any = {};

constructor() { }

ngAfterViewInit() {
this.options.enableBasicAutocompletion = true;
}

ngOnInit() {
}
Expand Down

0 comments on commit 8722cba

Please sign in to comment.