Skip to content

Commit

Permalink
standard components
Browse files Browse the repository at this point in the history
  • Loading branch information
GerbenRampaart committed May 6, 2016
1 parent a44c5ea commit 008ce5f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
4 changes: 4 additions & 0 deletions ngbook2-components/app/app.component.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ngbook2-components/app/app.component.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions ngbook2-components/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { Component } from "angular2/core";
})
export class AppComponent {

colorinput: number;
fontsize: number;
color: string;
fontSize: number;

visible: boolean;
// options: Array<number>;
Expand All @@ -26,4 +26,9 @@ export class AppComponent {
this.currentOption++;
}
}

apply(color, fontSize) {
this.color = color;
this.fontSize = fontSize;
}
}
11 changes: 7 additions & 4 deletions ngbook2-components/app/app.view.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<div class="ui button">
<button (click)="toggle()">toggle</button>
</div>

<button class="ui button" (click)="toggle()">toggle</button>

<div>number:</div>
<div>{{ currentOption }}</div>
Expand Down Expand Up @@ -38,4 +37,8 @@
<span [ngStyle]="{ color: colorinput.value }">
{{ colorinput.value }} text
</span>
</div>
</div>

<button class="ui primary button" (click)="apply(colorinput.value, fontinput.value)">
Apply settings
</button>

0 comments on commit 008ce5f

Please sign in to comment.