Ng-repeat with dynamic ng-model on input not working

后端 未结 2 1142
借酒劲吻你
借酒劲吻你 2021-01-23 17:06

In controller I\'ve a list like this:

scope.data = [ { user: { address: { city: \'Boston\'} } } ];

And a property, where I\'ve the name to acce

2条回答
  •  青春惊慌失措
    2021-01-23 17:51

    You can do it like this because of ng-repeat:

    
    

    So you do not need to declare this:

    $scope.propertyName = 'address.city';
    

    Demo

提交回复
热议问题