angularjs - ng-repeat not working with set data structure -


i'm trying use ng-repeat field set in javascript https://developer.mozilla.org/es/docs/web/javascript/reference/global_objects/set. tried use values(), keys(), entries() method set ng-repat not working, know way, hack work?

resumed code:

function campaign () {   this.site = {     type : '',     domains : new set()   }; } 

controller:

.controller('campaignstep1ctrl', ['$scope', 'languages', 'geolocationservice',         function ($scope, languages, geolocationservice) {         var vm = this;         vm.campaign = $scope.campaign;  } 

html:

<tr class="ui-widget-content ui-datatable-empty-message" ng-repeat="domain in vm.campaign.site.domains">   <td colspan="2">{{domain}}</td> </tr> 

note: if use console.log() , print domains attribute, prints, think problem ng-repeat.

this not best solution can make work this:

view:

<p ng-repeat="value in getsetasarr(set)">{{ value }}</p> 

controller:

$scope.getsetasarr = function (set) {     var arr = [];     set.foreach(function (value) {         arr.push(value);     });      return arr; }; 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -