Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I would like to create an alert that does not use ng-repeat. I've created a simple function that will fill in the parameters for type and message. I am able to successfully add the message but not able to get the type to change. Can someone explain what I would need to get the type to change from the default to they type I would like?

http://plnkr.co/edit/DfuD8A?p=preview

I am pretty new to javascript and Angular so any help you can give me is very much appreciated.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You're hitting a known bug: https://github.com/angular-ui/bootstrap/issues/2168

At the moment, you can workaround it by redefining the template as described in the bug report, or by regenerating the alert every time the alert is shown using an ng-if directive:

<alert ng-if="alertMsg" ... />
share|improve this answer
1  
Thank you so much, This work around is awesome. –  gbeford Jun 24 at 12:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.