Can I combine Twitter flight with AngularJS?

A couple of hours ago, Twitter released Flight, a component-based JavaScript framework. Its components are simple DOM elements and exchange data through simple DOM events, which is very nice.

I just wonder ... can I combine this with AngularJS? If I understand both structures correctly, I can create "new" elements using AngularJS that can be used and contain Flight components. And these components can be populated with AngularJS data. In other words, I could use AngularJS as usual, but the directives are "decorated" with Flight components. (Use Flight to create views, and use AngularJS for everything else.)

Would that make sense? If not ... I do not understand the purpose of the flight: (

+5
source share
1 answer

I understand that you want to do the following: Decorate AngularJS directives with Flight and Flight view components.

Perhaps you could create these Flight components as part of the directive and take advantage of Angular's data binding offers. However, judging by the following:

"Flight enforces strict separation of concerns. 
 When you create a component you don't get a handle to it. "

It seems that Flight is not conducive to what you are talking to these components through data binding.

In addition, directives can already be seen as components. As for creating views, in AngularJS the DOM is already a point of view, for what specific reason would you need to use a top view from above?

, AngularJS , Flight, , DOM ( , , - , ).

. , Flight , Angular. , AngularJS , Flight, .

+11

All Articles