FIDDLE
I have created a directive :-
return { restrict: \'EAC\', scope: { statesActive: \'=\' },
return { restrict: 'EAC', scope: { statesActive: '=' }, link: function (scope, element, attrs) { var stateData = angular.fromJson(attrs.statesActive).states; // Probably, your "states" model here .... }