I have this string :
this.badge = `<span class="badge">{{ notification}}</span>`
to interpret the {{ notification}} expression I do :
this.badge = this.$interpolate(this.badge)(this)
What i would like to do now is to add an ng-if
in the span
element :
this.badge = `<span ng-if="notification > 0"class="badge">{{ notification}}</span>`
But the $interpolate
service does not support this, how can I "compile" the condition of ng-if ?