Skip to content

Instantly share code, notes, and snippets.

@msarsha
Last active December 23, 2017 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msarsha/e12c709f8d628165d563561a560eb49b to your computer and use it in GitHub Desktop.
Save msarsha/e12c709f8d628165d563561a560eb49b to your computer and use it in GitHub Desktop.
angular popover api
@Component({
template:`
<div popover="popoverOne">
// content
</div>
<div popover="popoverTwo">
// content
</div>
<popover #popoverOne>
<form>
// fields...
<button (click)="submitOne()">Submit</button>
</form>
</popover>
<popover #popoverTwo>
<form>
// fields...
<button (click)="submitTwo()">Submit</button>
</form>
</popover>
`
})
export class AppComponent{
constructor(private serviceOne: ServiceOne,
private serviceTwo: ServiceTwo){}
submitOne(){
this.serviceOne.do();
}
submitTwo(){
this.serviceTwo.do();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment