1
I have the following dropdown:
<select>
<option ng-repeat="x in Ruas">{{x.Rua}}</option>
</select>
I need to take the selected value in the dropdown (x.Street) and set in an attribute of another Cope called: home
1
I have the following dropdown:
<select>
<option ng-repeat="x in Ruas">{{x.Rua}}</option>
</select>
I need to take the selected value in the dropdown (x.Street) and set in an attribute of another Cope called: home
3
Assign the selected value to a scope variable indicating a model property, via ng-model
.
The following example stores the selection in the property $scope.casa.rua
(assuming that $scope.casa
is a pre-existing object):
<select ng-model='casa.rua'>
<option ng-repeat="x in Ruas">{{x.Rua}}</option>
</select>
Browser other questions tagged javascript angularjs
You are not signed in. Login or sign up in order to post.
worked ! thanks Onosendai !
– Renan Santos
Always happy to help!
– OnoSendai