user3723240
user3723240

Reputation: 393

Angular JS getting a value to appear in an input text

I have this value here:

{{step1.$valid}}

which returns false. What I am trying to do is get the text "false" to appear in an input text box:

<input type="text" ng-model="user.stepValidation" ng-value="{{step1.$valid}}"/>

I have also tried value and ng-bind and neither of these get the value from {{step1.$valid}} to appear in my input text...please help.

Upvotes: 0

Views: 54

Answers (1)

Amir Popovich
Amir Popovich

Reputation: 29846

Try this:

<input type="text" ng-model="user.stepValidation.step1.$valid"/>

Here's a Fiddle.

Upvotes: 1

Related Questions