How to format text in options for select in AngularJS?

后端 未结 2 1977
眼角桃花
眼角桃花 2021-02-12 11:44

I have the following json object:

$scope.values = [
        {
            \"id\": 2,
            \"code\": \"Code 1\",
            \"name\": \"Sample 1\"
                


        
2条回答
  •  再見小時候
    2021-02-12 12:41

    Sure, you can achieve that by invoke ng-repeat for option,

    HTML

       
    

    JS

    the same

    Demo Fiddle

提交回复
热议问题