Skip to content

Commit

Permalink
fix(md-input): remove update error for md-placholder
Browse files Browse the repository at this point in the history
also add sample for input using md-placeholder attribute
  • Loading branch information
Ullfis committed May 27, 2016
1 parent 49cef9d commit ba1e408
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
7 changes: 7 additions & 0 deletions sample/src/samples/input/placeholder.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template>
<div>
<md-input md-placeholder="placeholder text" md-label="put some text here" md-value.bind="textValue"></md-input><br />
You entered: ${textValue}<br />
<button md-button="flat: true;" md-waves class="accent-text" click.delegate="setText()">set text to something</button>
</div>
</template>
6 changes: 6 additions & 0 deletions sample/src/samples/input/placeholder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export class Placeholder {
textValue = '';
setText() {
this.textValue = 'something';
}
}
4 changes: 4 additions & 0 deletions sample/src/samples/input/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
"icon-prefixes": {
"route": "icon-prefixes",
"files": ["html", "js"]
},
"placeholder": {
"route": "placeholder",
"files": ["html", "js"]
}
}
}
2 changes: 1 addition & 1 deletion src/input/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class MdInput {
}
if (this.mdPlaceholder) {
this.input.setAttribute('placeholder', this.mdPlaceholder);
this.update();
this.updateService.update();
}
}
Expand Down

0 comments on commit ba1e408

Please sign in to comment.