Last active
December 23, 2017 10:24
-
-
Save msarsha/e12c709f8d628165d563561a560eb49b to your computer and use it in GitHub Desktop.
angular popover api
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
@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