-1

Alert-Banner is applied in our clarity UI. It is triggered by error message and Alert-ERROR message type.

<alert-banner [message]="message" [type]="messageType"></alert-banner>

This alert only shows up after UI main page get refreshed. Not sure if the way we use alert-banner is wrong - some settings that trigger page refreshed is missed in the alert-banner definition.

Or we should apply other alerts mechanism. reading around https://vmware.github.io/clarity/community could not find an example pass varied "alert text" in.

  • Have you reviewed this post? https://stackoverflow.com/questions/47440926/how-to-display-alert-on-app-level-from-a-child-component – Jeremy Wilken Mar 26 '18 at 16:08
  • Thanks Jeremy pointed this out. The sample and the effect is very clear - it is app level alerts. The effect is a little bit different from what I am looking for. In our UI, different operation is under different Tab. And, actually, I am expecting the Alert only shows up under that TAB. Also, in the clarity documentation, there is standard alerts. Do you think standard alerts have component scope, such as tab, display ? – nextgen-ui Mar 26 '18 at 19:52
  • Use `` to toggle the state of an alert, where you set `state` to true or false to display it. I don't understand your question otherwise, as alerts can be app level or inline (in a tab or wherever they are defined). – Jeremy Wilken Mar 30 '18 at 02:04

1 Answers1

0

Clarity doesn't have an <alert-banner> component. Did you check where it was defined?

Eudes
  • 1,521
  • 9
  • 17
  • import { AlertBannerComponent } from 'app/shared/alert-banner.component'; – nextgen-ui Mar 26 '18 at 06:44
  • Reading clarity alerts documentation, it has clr-alert, alert-item, sample and code. Did not find the syntax to pass in a customized alert-text. Where can I find an open source project having this kind of example ? – nextgen-ui Mar 26 '18 at 06:48
  • Actually, I am trying to figure out what is the triggering mechanism of clarity alerts. Looks like all the alerts are static. I need an alert only show up when some condition satisfied. – nextgen-ui Mar 26 '18 at 06:55