Created
June 27, 2016 05:50
-
-
Save tkssharma/985bedf80e72daec0488bc7b3dc7778a 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
@Component({ | |
selector: 'search-product', | |
template: | |
`<div> | |
<input #prod> | |
<button (click)="findProduct(prod.value)">Find Product</button> | |
Product name: {{product.name}} | |
</div> | |
` | |
}) | |
class SearchComponent { | |
product: Product; // code of the Product class is omitted | |
findProduct(prodName: string){ | |
// Implementation of the click handler goes here | |
} | |
// Other code can go here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment