How to bind dropdown control in edit mode?

前端 未结 2 1442
感情败类
感情败类 2021-01-14 13:21

I am having a list of country along with its corresponding states.

Now i want to bind the country and state value in dropdown control when open in edit mode.

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-14 13:35

    You can use ng-repeat

       
    

    Or use ng-options

    
    

    In your controller define an array of countries.

    $scope.countries = ['America', 'Australia', 'london'];
    

提交回复
热议问题