I am preparing a talk about “Get ready for Angular 2.0 today,” and I intend to talk about changes in the structure of the application needed to facilitate the transition (I know Angular 2.0 is not ready, but the basic concepts are ready).
I started a demo project to demonstrate the "before" application, wrote a simple "old" Angular 1.x. Then I intend to change this structure of the application, which will be written in the form of a tree of components and will be linked between components (directives) using attributes (similar to property binding and event binding in Angular 2. Event binding will be through the event-methods attribute). The next step is to change the code to use Typescript, and then the last part will write the same application using the actual Angular 2.0.
My question is: I have html entries written in Angular 1.x using ng-model and two-way data binding. I want to change it as the “Angular 2 way” as I can, which means to communicate with their parent component through attributes and events. This is my demo project (component breakdown is marked with a hyphen)

The only way I can think of this is to not use ng-model, something like:
<input ng-keyup="ctrl.event()" value={{ctrl.value}} />
Any comments would be highly appreciated!
source
share