Created
May 18, 2019 19:34
-
-
Save geeksilva97/ebd1b3ac16baf8afb430eb0b5db8ff05 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'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class AppComponent { | |
showModal: boolean = false; | |
selected: string = ''; | |
selectItem() { | |
this.showModal = true; | |
} | |
selectedItem(selected) { | |
this.showModal = false; // hide modal | |
if(selected) { | |
this.selected = selected; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment