externalized templates and styles (styles are still empty)
This commit is contained in:
parent
0cf6eeaedf
commit
dd4ffd9989
7 changed files with 25 additions and 22 deletions
0
app/app.component.css
Normal file
0
app/app.component.css
Normal file
3
app/app.component.html
Normal file
3
app/app.component.html
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<div>
|
||||||
|
<den-inputarea></den-inputarea>
|
||||||
|
</div>
|
|
@ -5,12 +5,10 @@ import {InputareaComponent} from "./inputarea.component";
|
||||||
//import { SelectorComponent } from "./selector.component";
|
//import { SelectorComponent } from "./selector.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
moduleId: module.id,
|
||||||
selector: "den-app",
|
selector: "den-app",
|
||||||
template: `
|
templateUrl: "app.component.html",
|
||||||
<div>
|
styleUrls: ["app.component.css"]
|
||||||
<den-inputarea></den-inputarea>
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
// private inputAreas:InputareaComponent[] = [];
|
// private inputAreas:InputareaComponent[] = [];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { ConversionType} from "./conversiontype";
|
import {ConversionType} from "./conversiontype";
|
||||||
|
|
||||||
export class ConversionInput {
|
export class ConversionInput {
|
||||||
public content:string;
|
public content:string;
|
||||||
|
|
0
app/inputarea.component.css
Normal file
0
app/inputarea.component.css
Normal file
8
app/inputarea.component.html
Normal file
8
app/inputarea.component.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<div id="wrapper-{{index}}" class="wrapper">
|
||||||
|
<textarea id="input-{{index}}" class="input" (change)="update()" placeholder="Please enter your input ..."
|
||||||
|
[(ngModel)]="conversion.content">{{conversion.content}}</textarea>
|
||||||
|
<select id="type-{{index}}" class="conversion" (change)="convert($event)">
|
||||||
|
<option id="-1">Select conversion ...</option>
|
||||||
|
<option *ngFor="let c of conversions" id="{{c}}">Type {{ConversionType[c]}}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
|
@ -1,19 +1,13 @@
|
||||||
import { Component } from "@angular/core";
|
import {Component} from "@angular/core";
|
||||||
import { ConversionInput } from "./conversioninput";
|
import {ConversionInput} from "./conversioninput";
|
||||||
import { ConversionType } from "./conversiontype";
|
import {ConversionType} from "./conversiontype";
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
moduleId: module.id,
|
||||||
selector: "den-inputarea",
|
selector: "den-inputarea",
|
||||||
template: `
|
templateUrl: "inputarea.component.html",
|
||||||
<div id="wrapper-{{index}}" class="wrapper">
|
styleUrls: ["inputarea.component.css"]
|
||||||
<textarea id="input-{{index}}" class="input" (change)="update()" placeholder="Please enter your input ..." [(ngModel)]="conversion.content">{{conversion.content}}</textarea>
|
|
||||||
<select id="type-{{index}}" class="conversion" (change)="convert($event)">
|
|
||||||
<option id="-1">Select conversion ...</option>
|
|
||||||
<option *ngFor="let c of conversions" id="{{c}}">Type {{ConversionType[c]}}</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
})
|
})
|
||||||
export class InputareaComponent {
|
export class InputareaComponent {
|
||||||
public index:number = 0;
|
public index:number = 0;
|
||||||
|
|
Loading…
Reference in a new issue