You did the trick - high five!
On Thursday, August 25, 2016 at 5:34:48 PM UTC+2, Prateek Reddy wrote:
>
> What do you mean by initially select by its model.Do you want to preload
> the default value in the dropdown.If yes,then you can just do
> ng-options="s.Id as s.Value for s in HuslejeOgUdgifter.
> AnslaaetElType.PreValues"
>
> On Thursday, 25 August 2016 09:49:40 UTC-4, casper korsgaard wrote:
>>
>> Hi,
>>
>> Given this object:
>>
>> $scope.HuslejeOgUdgifter = {
>> AnslaaetElType: {
>> EditorId: 41414,
>> Id: 51,
>> Alias: "anslaaetElType",
>> Value: "Aconto",
>> PreValues: [
>> {
>> Value: "Tilmelding",
>> Id: 49,
>> SortOrder: 1
>> },
>> {
>> Value: "Inklusiv",
>> Id: 50,
>> SortOrder: 2
>> },
>> {
>> Value: "Aconto",
>> Id: 51,
>> SortOrder: 3
>> }
>> ]
>> }
>> }
>>
>> To this element
>>
>> <select
>> ng-options="s.Id as s.Value for s in
>> HuslejeOgUdgifter.AnslaaetElType.PreValues track by s.Id"
>> ng-model="HuslejeOgUdgifter.AnslaaetElType.Id"
>> no-dirty-check>
>> </select>
>>
>> How can i get the dropdown to initially select by it's model: $
>> scope.HuslejeOgUdgifter.AnslaaetElType.Id
>>
>> Here is a plnk that will show how far i got so far...
>> https://plnkr.co/edit/MaCgoj
>>
>> Thanks,
>>
>> //casper
>>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.