-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working if ng-model is of datatype number #51
Comments
Then i tried to help myself using dynamic options. I created this array in my viewmodel:
and modified my html to:
But this always writes the full option-object into my ng-model "testmodel".But i only want to store the numeric value "Id"! I tried to change the select-statement to "option.Id as option in GuidanceInitiatorOptions". But that gives exceptions in your code. |
You need to use value expression in each option, see the example of Value Expression <ol class="nya-bs-select form-control" ng-model="testmodel">
<li class="nya-bs-option" value="option.Id" nya-bs-option="option in GuidanceInitiatorOptions track by option.Id">
<a>{{option.DisplayName}}</a>
</li>
</ol> |
Can we add ng-change to nya-bs-select dropdown?? |
ng-change relies on the native form controls, this directive is not a native form control |
Successfully tested your component with model-values of type string.
But if i bind it to a model of type number the component always Shows 'Nothing selected'.
I tried it with static values like in this sample code:
in JavaScript:
this works: $scope["testmodel"] = "1";
this does not work: $scope["testmodel"] = 1;
The text was updated successfully, but these errors were encountered: