javascript - Text not wrapping in p tag from Json text file.(Angular Js) -


this question has answer here:

i retrieve data json , retrieve text content text content not support p tag. show screen shot hints.
enter image description here

when retrieved text content showing this(with p tag). json url:

http://www.json-generator.com/api/json/get/btrwzhcvug?indent=2

html:

<div ng-controller="chooseproductdescription">       <div ng-repeat="cat in productdescription">                 <div>{{cat.product.fulldescription}} </div>                     </div> </div> 

controller:

.controller('chooseproductdescription', function($scope, $http){     $http({         method:'get',         url:'http://www.json-generator.com/api/json/get/btrwzhcvug?indent=2',         header:{'content-type':'application/json'},     }).success(function(data,status,headers, config){            $scope.productdescription = data;            }).error(function(data, status,headers, config){      }) }) 

when retrieve content in view page p tag not support in angular js. should do? please let me know. in advance.

use ngbindhtml

<div ng-controller="chooseproductdescription">       <div ng-repeat="cat in productdescription">                 <div ng-bind-html="cat.product.fulldescription"></div>                     </div> </div> 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -