I'm attempting to build a very simple component in Angular 2.0, a custom dropdown called <my-select>
.
I am passing model
into <my-select>
, which I am expecting to be updated when the end-user chooses an option from the dropdown.
Plunker: http://plnkr.co/edit/iY1hG0q9rsgrR6ltKXW4?p=preview
As we can see from the Plunker, only the model
object local to <my-select>
is being updated, not the model
object I passed in from <app>
. What am I missing here? How does one two-way bind to a custom component?
In Angular 1.x, this was as simple as passing a variable into the $scope
of the directive
using =
.