A part we got stuck on recently was regarding binding functions to the component from the parent controller. Each component can have its own controller, so you can put all sorts of nice events within the controller, but sometimes you need to access a tool from outside. Here’s how (and why) we did this.
Telerik offers a fantastic library called Kendo UI. They’ve converted all of the objects into Angular Directives. They’re great, except there are some issues that really arise from the actual platform. Angular is very data-centric. You don’t pick an object and then change it, as you do in jQuery, you define the parameters of the object as variables and then let the data do the work naturally.
Using Kendo ObservableArray’s lets us avoid unnecessary constructs that just don’t ever seem to work out for us in AngularJs.
The next step to preparing yourself for Angular 2.0 is to move from the Controller model to Component model. If you’ve had any experience with directives, you’ll see the format of what we’d use for a controller in TypeScript is similar. (I stripped out our main code, leaving what we use as a framework.) module […]