1

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.

1 Answer 1

1

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" ... />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.