Last active
May 17, 2017 07:16
-
-
Save marcel-ploch/305be06696b6133bc99005fffd871ee1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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