mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-04-16 05:15:14 +00:00
+ Http changed with HttpClient, + Angular Material Element examples added, + angular2-markdown Library added
28 lines
666 B
TypeScript
28 lines
666 B
TypeScript
import {Component} from '@angular/core';
|
|
import {MdSnackBar} from '@angular/material';
|
|
|
|
/**
|
|
* @title Snack-bar with a custom component
|
|
*/
|
|
@Component({
|
|
selector: 'snack-bar-component-example',
|
|
templateUrl: 'snack-bar-component-example.html',
|
|
})
|
|
export class SnackBarComponentExample {
|
|
constructor(public snackBar: MdSnackBar) {}
|
|
|
|
openSnackBar() {
|
|
this.snackBar.openFromComponent(PizzaPartyComponent, {
|
|
duration: 500,
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
@Component({
|
|
selector: 'snack-bar-component-example-snack',
|
|
templateUrl: 'snack-bar-component-example-snack.html',
|
|
styleUrls: ['snack-bar-component-example-snack.css'],
|
|
})
|
|
export class PizzaPartyComponent {}
|