Thursday, 22 September 2016

Building A Notepad with Dart Angular 2 : Part Two

Last time we got the basic notepad off the ground. A toolbar would be a good incremental step, complete with chunky buttons.

Angular 2 has a different markup for events (click) but after that it is straightforward handler writing as methods of the component. The first button allows that text content to be downloaded as a file. The second trims trailing and leading whitespace. The third displays a crude alert text box. Next time we will look at upgrading this to a dialog.

Check the app out here and the code is on GitHub.There's a few tweaks to the colours and layouts - bring your own CSS to the party if you like!