JSFiddle - React, Tailwind, and code Playground
by Gautam Kumar
HTML
<div ng-app="test">
<div ng-controller="cont">
<ul>
<li ng-click="updateKey(val)" ng-repeat="(key, val) in data">{{val.name}}</li>
</ul>
<ul id="profile-ul">
<li ng-repeat="val in profile">{{val}}</li>
</ul>
</div>
</div>
JavaScript
var data = [{
'name' : 'A',
'profile' : ['A 1','A 2','A 3']
},
{
'name' : 'B',
'profile' : ['B 1','B 2','B 3']
}
]
var angApp = angular.module('test',[]);
angApp.controller('cont', ['$scope', function($scope){
$scope.data = data;
$scope.updateKey = function(data){
$scope.profile = data.profile;
}
}])