Closed gugahoi closed 8 years ago
Try to use scoped variable 't' This variable set to the first letter of the message class name For example "error" -> t = "e"
That's perfect! Below is a sample of what I was wanting to do:
<div class="ui-notification">
<h3 ng-show="title">
{{title}}
<i class="fa fa-check-circle pull-right" ng-show="t === 's'"></i>
<i class="fa fa-exclamation-circle pull-right" ng-show="t === 'w'"></i>
<i class="fa fa-times-circle-o pull-right" ng-show="t === 'e'"></i>
</h3>
<div class="message" ng-bind-html="message"></div>
</div>
Or use it with ngClass as needed!
Just wanted to know if there is a way to do this.
I would like the icons within my custom notifications to be different for
error
,warning
andsuccess
types however I see no way of doing that other that passing in the icon html with the message or creating a new scope to pass in.Is there a way to check the notification "type" inside a custom template?