Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.
Listening for these events will help performing specific actions on CUI template.
<script type="text/javascript"> window.addEventListener('load', () => { document.body.addEventListener('AceEventAuthenticated', () => { // navigate to application main content }); document.body.addEventListener('AceEventUnauthenticated', () => { // navigate to login page }); }); </script>
import { Component, Inject, OnInit } from '@angular/core'; import { DOCUMENT } from '@angular/common'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent implements OnInit { constructor(@Inject(DOCUMENT) private document: Document) {} ngOnInit(): void { this.document.body.addEventListener('AceEventAuthenticated', () => { // navigate to application main content }); this.document.body.addEventListener('AceEventUnauthenticated', () => { // navigate to login page }); } }