-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Alert type expressions are ignored when applied in an event method (always shows warning-style) #2145
Comments
Good catch. Looks like 794954a broke it. Using |
Regression from angular-ui#1745 as there's a double interpolation expected but ngClass doesn't support that. The attribute value of ngClass is only interpolated once and the interpolated expression is watched. Fixes angular-ui#2145
Hmm, I didn't know that |
This seems to be still an issue in angular-bootstrap 0.11 This breaks my app as an exception is thrown while angular is parsing ui-bootstrap-tpls.js and generating a class name of I have verified that angular-bootstrap 0.10 does not have this problem, and that applying the change above also fixes it. |
@AnthonySteele this fix wasn't part of 0.11.0, it will be released with 0.12.0. |
Yep, we will stay on 0.10 until 0.12 is out, as 0.11 is not usable for us. |
@chrisirhc Plus one for |
I came across following issue, which I have recreated in following plunker: http://plnkr.co/edit/iKUc68725E7daDKKbGW6?p=preview
It shows a button which will trigger an alert.
The alert is customized by data coming from the controller.
When setting the data directly in the controller, the alert is customized just fine.
E.g.
$scope.alert = {type: "danger", message: "This is a danger-alert"};
shows a correct red alert box.
However, when the same object is created from inside the submit-method, only the text will be applied and the design of the alert box will be rendered using "warning"-style (yellow-ish).
Does this have something to do with the latest modifications to the scope of the alert template?
This has been driving me nuts for the few past hours (I have just started with Angular / ui-bootstrap).
Feel free to fiddle around with the plunker link and uncomment the first $scope.alert = { .... occurence while commenting the later one.
TLDR:
Alert-Markup using {{alert.message}} fails when the alert object is changed during a form-submit event, as it will always show type = warning, even though the generated markup shows traces of the correct type (contains class alert-danger within ng-class attribute)
I hope the issue is somewhat understandable
The text was updated successfully, but these errors were encountered: