angularjs - combine string and html string and display in ui-bootstrap popover -


i using restangular collection of items server. each item has description, normal string , longdescription contains html describing how should formatted.

i trying display information in single ui-bootstrap popover

i have added restangule response interceptor so

var addtrusteddesc = function(room) {             var result;             var desc = room.description;             var longdesc = room.longdescription;              if(desc && longdesc) {                 result = desc + ' </br> ' + longdesc;             } else if(desc) {                 result = desc;             } else if(longdesc) {                 result = longdesc;             }              room.trusteddesc = $sce.trustashtml(result);             return room;         };  restangularconfigurer.addresponseinterceptor(function(data) {                 return _.map(data, function(room) {                     return addtrusteddesc(room);                 });             }); 

and later try use trusteddesc in popover so

popover="{{ row.data.trusteddesc }}" 

but popover displays {}

if change line above

room.trusteddesc = $sce.gettrustedhtml($sce.trustashtml(result));

or simply

room.trusteddesc = result;

then popover displays full string including html elements

is possible popover render html , display it?

your problem bootstrap ui popover cannot handle custom template. try use custom popover of angular strap instead http://mgcrea.github.io/angular-strap/#popovers


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -