Skip to content

Instantly share code, notes, and snippets.

@marcel-ploch
Last active May 17, 2017 07:16
Show Gist options
  • Save marcel-ploch/305be06696b6133bc99005fffd871ee1 to your computer and use it in GitHub Desktop.
Save marcel-ploch/305be06696b6133bc99005fffd871ee1 to your computer and use it in GitHub Desktop.
import {Component} from '@angular/core';
import {DialogButtonPosition} from './modules/dialog/models/DialogButtonPosition.model';
import {DialogConfiguration} from './modules/dialog/models/DialogConfiguration.model';
import {DialogSettings} from './modules/dialog/models/DialogSettings.model';
import {Dialog} from './modules/dialog/services/Dialog.service';
@Component({ selector : 'tbody', templateUrl : './app.component.html', styleUrls : [ './app.component.css' ] })
export class AppComponent {
notificationOptionLeft: DialogConfiguration
= new DialogConfiguration('Alert Content', new DialogSettings('Decline', 'Approve'), new DialogButtonPosition('decline-left', 'approve-left'));
constructor(private _Dialog: Dialog) {
}
/**
* Adding Click Event Function Opening the Coo-Dialog Dialog
*/
clickAlert(): void {
const notificationOption: DialogConfiguration = new DialogConfiguration(`Nachricht welche angeziegt werden soll`, new DialogSettings('Abbrechen', 'Ok'));
this._Dialog.alert(notificationOption)
.then((data) => {
console.log(data);
})
.catch((data) => {
console.log(data);
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment