Angular Dart: material input initial value
up vote
0
down vote
favorite
I am using angular dart to create a web application.
I have a page where i use material input to get input from the user. in that, i need to have a default initial value in the text box as soon as the page is loaded.
I don't want to bind the input to any variable as this is just a one time use and i will not need binding from component to template after this.
is there a way to specify default/initial value for 'material-input' in dart?
templates dart angular-material angular-dart
add a comment |
up vote
0
down vote
favorite
I am using angular dart to create a web application.
I have a page where i use material input to get input from the user. in that, i need to have a default initial value in the text box as soon as the page is loaded.
I don't want to bind the input to any variable as this is just a one time use and i will not need binding from component to template after this.
is there a way to specify default/initial value for 'material-input' in dart?
templates dart angular-material angular-dart
"I don't want to bind the input to any variable as this is just a one time use" how will you handle user input? I think you need to bind to a variable.
– Günter Zöchbauer
Nov 8 at 10:20
<material-input ngModel="default initial value">
– G. Tranter
Nov 8 at 21:43
i solved it using [ngModel]="value". Thanks all.
– Sabareesh
Nov 10 at 18:54
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am using angular dart to create a web application.
I have a page where i use material input to get input from the user. in that, i need to have a default initial value in the text box as soon as the page is loaded.
I don't want to bind the input to any variable as this is just a one time use and i will not need binding from component to template after this.
is there a way to specify default/initial value for 'material-input' in dart?
templates dart angular-material angular-dart
I am using angular dart to create a web application.
I have a page where i use material input to get input from the user. in that, i need to have a default initial value in the text box as soon as the page is loaded.
I don't want to bind the input to any variable as this is just a one time use and i will not need binding from component to template after this.
is there a way to specify default/initial value for 'material-input' in dart?
templates dart angular-material angular-dart
templates dart angular-material angular-dart
asked Nov 8 at 10:13
Sabareesh
12
12
"I don't want to bind the input to any variable as this is just a one time use" how will you handle user input? I think you need to bind to a variable.
– Günter Zöchbauer
Nov 8 at 10:20
<material-input ngModel="default initial value">
– G. Tranter
Nov 8 at 21:43
i solved it using [ngModel]="value". Thanks all.
– Sabareesh
Nov 10 at 18:54
add a comment |
"I don't want to bind the input to any variable as this is just a one time use" how will you handle user input? I think you need to bind to a variable.
– Günter Zöchbauer
Nov 8 at 10:20
<material-input ngModel="default initial value">
– G. Tranter
Nov 8 at 21:43
i solved it using [ngModel]="value". Thanks all.
– Sabareesh
Nov 10 at 18:54
"I don't want to bind the input to any variable as this is just a one time use" how will you handle user input? I think you need to bind to a variable.
– Günter Zöchbauer
Nov 8 at 10:20
"I don't want to bind the input to any variable as this is just a one time use" how will you handle user input? I think you need to bind to a variable.
– Günter Zöchbauer
Nov 8 at 10:20
<material-input ngModel="default initial value">
– G. Tranter
Nov 8 at 21:43
<material-input ngModel="default initial value">
– G. Tranter
Nov 8 at 21:43
i solved it using [ngModel]="value". Thanks all.
– Sabareesh
Nov 10 at 18:54
i solved it using [ngModel]="value". Thanks all.
– Sabareesh
Nov 10 at 18:54
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
You're probably looking for hintText
.
<material-input hintText="Initial value">
</material-input>
add a comment |
up vote
0
down vote
From the notes above:
<material-input [ngModel]="value">
Was the solution he used. This will push the value into the input without having it be a two way variable. Nate's suggestion of using hintText is also a good use of this.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
You're probably looking for hintText
.
<material-input hintText="Initial value">
</material-input>
add a comment |
up vote
1
down vote
You're probably looking for hintText
.
<material-input hintText="Initial value">
</material-input>
add a comment |
up vote
1
down vote
up vote
1
down vote
You're probably looking for hintText
.
<material-input hintText="Initial value">
</material-input>
You're probably looking for hintText
.
<material-input hintText="Initial value">
</material-input>
answered Nov 9 at 23:55
Nate Bosch
59129
59129
add a comment |
add a comment |
up vote
0
down vote
From the notes above:
<material-input [ngModel]="value">
Was the solution he used. This will push the value into the input without having it be a two way variable. Nate's suggestion of using hintText is also a good use of this.
add a comment |
up vote
0
down vote
From the notes above:
<material-input [ngModel]="value">
Was the solution he used. This will push the value into the input without having it be a two way variable. Nate's suggestion of using hintText is also a good use of this.
add a comment |
up vote
0
down vote
up vote
0
down vote
From the notes above:
<material-input [ngModel]="value">
Was the solution he used. This will push the value into the input without having it be a two way variable. Nate's suggestion of using hintText is also a good use of this.
From the notes above:
<material-input [ngModel]="value">
Was the solution he used. This will push the value into the input without having it be a two way variable. Nate's suggestion of using hintText is also a good use of this.
answered Nov 12 at 23:46
Ted Sander
1,09627
1,09627
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205569%2fangular-dart-material-input-initial-value%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
"I don't want to bind the input to any variable as this is just a one time use" how will you handle user input? I think you need to bind to a variable.
– Günter Zöchbauer
Nov 8 at 10:20
<material-input ngModel="default initial value">
– G. Tranter
Nov 8 at 21:43
i solved it using [ngModel]="value". Thanks all.
– Sabareesh
Nov 10 at 18:54