Created
May 16, 2016 07:17
-
-
Save tkssharma/7be4f09a261b82554d2193ec211de43a 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