SHARE
TWEET

Untitled

a guest Jun 26th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div>
  2.   <app-header></app-header>
  3.   <router-outlet></router-outlet>
  4.   <app-footer *ngIf="!userLoggedIn"></app-footer>
  5. </div>
  6. <p-toast [style]="{ marginTop: '80px' }" key="myToast"></p-toast>
  7.      
  8. @Component({
  9.   selector: 'app-root',
  10.   templateUrl: './app.component.html',
  11.   styleUrls: ['./app.component.scss'],
  12.   providers: [MessageService]
  13. })
  14. export class AppComponent implements OnInit, OnDestroy {
  15.  
  16.   constructor(
  17.     private readonly messageService: MessageService
  18.   ) {...
  19.      
  20. this.messageService.add({
  21.     severity: 'success',
  22.     summary: 'Success Message',
  23.     key: 'myToast',
  24.     detail: 'Order submitted'
  25.   });
  26.      
  27. this.ngZone.run(() => {
  28.   this.messageService.add({
  29.     severity: 'success',
  30.     summary: 'Success Message',
  31.     key: 'myToast',
  32.     detail: 'Order submitted'
  33.   });
  34. });
  35.      
  36. setTimeout(() => {
  37.   this.messageService.add({
  38.     severity: 'success',
  39.     summary: 'Success Message',
  40.     key: 'myToast',
  41.     detail: 'Order submitted'
  42.   });
  43. }, 1000);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top