Answer the question
In order to leave comments, you need to log in
How to use custom widget in Angular app?
Good afternoon.
There is a user base of widgets that are used on the site by other users and loaded into the interface by Ajax as needed. Widgets are pieces of HTML code with jQuery or pure javascript.
You can somehow make friends with such functionality with the fact that the rest of the site interface will be written using Angular.
As I understand from what I read about Angular, such things should be wrapped in directives. But you can't wrap an arbitrary custom widget.
Answer the question
In order to leave comments, you need to log in
You are right, custom directives should be wrapped in angular directives. If you can't change them, I can suggest using the $compile service ( https://docs.angularjs.org/api/ng/service/$compile ) for the wrapper.
But if it is assumed that the models inside the widget will interact with the Angular application, then without editing the code it will not work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question