angularjs - Angular ng-bind-html makes template rendering very slow -


i trying output list of jobs each having description in html, adding data-ng-bind-html="job.description" directive makes template rendering slow - more 10 seconds.

the jobs being returned server json e.g.

foreach ($jobs $j) {         $data_arr[] = [             'id' => $j->id,             'title' => $j->post_title,             'description' => $j->post_content, // contains html     ... ]} // ... return json data 

the controller looks this

 api.getjobs().success(function (data) {                 $scope.jobs = data;             }); 

the template setup this

<div data-ng-repeat="job in jobs">   <div>{{job.title}}</div>   <div data-ng-bind-html="job.description"></div> </div> 

if comment out data-ng-bind-html template renders fast. rendering 25 jobs , html few strong , li tags not sure why slow.

update,

it appears data-ng-bind-html slow operation, worked me render per job html after action has been taken user. in case when bootstrap accordion containing job expanded.

<div data-ng-if="status.open" data-ng-bind-html="job.description"></div> 


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -