umb-notifications.html - refactored switch logic (#8207)

* umb-notifications.html - refactored switch logic

I couldn't get the `url` property to render, so I've swapped out
the `ng-switch` statement with a couple of `ng-if` conditions.

* umb-notifications.html - changed quotes from single to double

For consistency.
This commit is contained in:
Lee Kelleher
2020-05-30 21:02:26 +01:00
committed by GitHub
parent f7cbac30b1
commit 717bbf1e2e

View File

@@ -7,18 +7,19 @@
<div ng-if="notification.view">
<div ng-include="notification.view"></div>
</div>
<div ng-if="notification.headline" ng-switch on="{{notification}}">
<a ng-href="{{notification.url}}" ng-switch-when="{{notification.url && notification.url.trim() != ''}}" target="_blank">
<strong>{{notification.headline}}</strong>
<div ng-if="notification.headline">
<a ng-if="notification.url" ng-href="{{notification.url}}" href="" target="_blank">
<strong ng-bind="notification.headline"></strong>
<span ng-bind-html="notification.message"></span>
</a>
<div ng-switch-default>
<strong>{{notification.headline}}</strong>
<div ng-if="!notification.url">
<strong ng-bind="notification.headline"></strong>
<span ng-bind-html="notification.message"></span>
</div>
</div>
<button type="button" class='close -align-right' ng-click="removeNotification($index)" aria-hidden="true">
<button type="button" class="close -align-right" ng-click="removeNotification($index)" aria-hidden="true">
<span aria-hidden="true">&times;</span>
</button>
</li>