I want to use carousel to display my angularjs directive,
what’s the best approach?
Please see example: http://webix.com/snippet/93d52e24
The idea is that I can put any directive not only ones that work w/ webix components
I came up w/ a solution, let me know if you think it is good approach.
I compile html that contains directive then set content of a template w/ id of element that I created.
See snippet: http://webix.com/snippet/b08edc4d
Because my application is dynamic i.e. views are created in run time based on definition received from the server.
Application does not know what views will be created and shown.
In the sample I hard coded view/directive (webix-datatable);
In the app I have another directive that creates view/directive based on information received from the server
Webix UI has ability to restructure self - you can add|remove views dynamically. Or reload part of configuration from the server side. Unfortunately I don’t see how to use with AngularJS
You can use services instead of directives, for incapsulating webix ui configuration ( services will provide json objects with ui config ). In such case you can have a single directive for top level ui. After that, when view need to be changed, you can request ui config from service and use webix API to replace one set of views with new one.