Answer the question
In order to leave comments, you need to log in
How to use CSS framework with Angular 4?
If the framework does not have a port, but only .js (for initialization of tooltips, popovers, etc.) and .css, how to use it with Angular?
Specific example:
The template has added a tooltip to the html, now you need to initialize it. As I would have done before: the page was rendered, the module was initialized, then conditionally $('#element').tooltip(), done, when hovering over the element, the tooltip is displayed.
How to proceed in the case of Angular 4? From ts code to find an element and call the desired method? Include $ and use it in ts components (please don't...)?
In this case, I want to use UIKit, I connected it to the project, everything is ok. It has a convenient initialization syntax: UIkit.tooltip(element, options). He does not need $, which is already good. But there are components that have callbacks and events - you need to use regular js there. Would it be right to do so? Or do I have no choice?
And for the future: if the css framework is tied to initialization through $, then how should I initialize and manage elements through Angular components?
UPD: I know about Angular Material, about ngBootstrap (ngb) too. The question is what to do if you need a framework that is not adapted for Angular.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question