Created
December 24, 2016 23:55
-
-
Save shumbo/5ca32e92891c8a28f9cea14220ed9e4e to your computer and use it in GitHub Desktop.
This file contains hidden or 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, OnInit } from '@angular/core'; | |
import { ModalContext } from '../modal/modal.service'; | |
@Component({ | |
selector: 'app-sample-modal', | |
templateUrl: './sample-modal.component.html', | |
styleUrls: ['./sample-modal.component.scss'] | |
}) | |
export class SampleModalComponent implements OnInit { | |
public name: string; | |
constructor( | |
private modalCtx: ModalContext | |
) { } | |
ngOnInit() { | |
} | |
close() { | |
this.modalCtx.reject(); | |
} | |
done() { | |
this.modalCtx.resolve(this.name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment