angularjs - Angular filter to add " before and after variable content -


i have following html / angular code:

<blockquote>   {{testimonial.text}} </blockquote> 

how can create filter, named blockquote, add " before , after {{testimonial.text}}?

something like:

{{testimonial.text | blockquote}} 

would render as:

"testimonial text content" 

in opposing current code renders:

testimonial text content 

just create filter adds " on start , end of input:

.filter('blockquote', function() {   return function(value) {     return '"' + value + '"';   } }) 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -