how to use ng-option to set default value of select element

前端 未结 12 666
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 11:07

I\'ve seen the documentation of the Angular select directive here: http://docs.angularjs.org/api/ng.directive:select. I can\'t figure how to set the default value. This is

12条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 11:50

    This answer is more usefull when you are bringing data from a DB, make modifications and then persist the changes.

     
    

    Check the example here:

    http://plnkr.co/edit/HrT5vUMJOtP9esGngbIV

提交回复
热议问题