I have a problem with laravel tags there I can't set a laravel value selected in ng-options. Can we help me please?
I don't understand how to work between laravel variable and angularjs together in this case.
{!!
Form::select('store_id', [], ['class'=>'form-control'],
[
'ng-options' => 'store as store.fantasy_name for store in vm.stores',
'ng-model' => 'data.store',
'ng-selected' => "store.id == '$store->id'"
])
!!}
-
Obs.: The
ng-model
"data.store" is used to show store name. So I don't want move here. -
References:
AngularJS - Set default value on select inside a ng-repeat
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2mVAz29
via IFTTT
Aucun commentaire:
Enregistrer un commentaire