AngularJS: ng-repeat with key value - updating object

前端 未结 3 933
鱼传尺愫
鱼传尺愫 2021-02-20 10:36

I am rendering key:value object array with ng-repeat like this:

<
3条回答
  •  说谎
    说谎 (楼主)
    2021-02-20 11:06

    :

    And the JS:

    var myApp = angular.module('myApp', []);
    
    var mainCtrl = function($scope){
    $scope.records = [
    {'name':'key1','value':'val1'},
    {'name':'key2', 'value':'val2'}
            ];
    }
    

提交回复
热议问题