Created
July 2, 2017 11:58
-
-
Save Armenvardanyan95/c5a6f87107d56f7f7085bee614b82596 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: 'some-component', | |
| template: ` | |
| <div> | |
| <dropdown-component [options]="weightUnits"></dropdown-component> | |
| <-- This will render a dropdown based in the options --> | |
| <input type="text" placeholder="Price"> | |
| <dropdown-component [options]="weightUnits"></dropdown-component> | |
| <-- We need to make this one's labels to be preceded with a slash --> | |
| </div> | |
| ` | |
| }) | |
| export class SomeComponent { | |
| public weghtUnits = [{value: 1, label: 'kg'}, {value: 2, label: 'oz'}]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment