Skip to content

Instantly share code, notes, and snippets.

@shumbo
Created December 24, 2016 23:55
Show Gist options
  • Save shumbo/5ca32e92891c8a28f9cea14220ed9e4e to your computer and use it in GitHub Desktop.
Save shumbo/5ca32e92891c8a28f9cea14220ed9e4e to your computer and use it in GitHub Desktop.
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