I'm currently working on building a form in Angular2 using the Polymer paper-dropdown-menu
element. I've been struggling to figure out how to bind the selected value of the dropdown to my component's control. Despite numerous attempts, I haven't had any success. Has anyone managed to overcome this challenge?
Here is an example of a functional paper-input
:
template:
<paper-input type="password"
ngControl="password"
ngDefaultControl>
</paper-input>
component:
constructor(private fb:FormBuilder) {
this.loginForm = fb.group({
password: new Control("")
});
}
Is there a similar approach for paper-dropdown-menu
? I would be satisfied with either binding to the value or the text itself. Thank you!