Привет! Я пытался добавить сторонний плагин jquery в свое приложение Angular 7. До сих пор я сделал: добавил в angular.json расположение таких файлов:
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"src/assets/js/ticker/jquery.easy-ticker.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js"
]
В моем AppComponent:
declare var $: any; interface JQuery { easyTicker(options?: any):
JQuery; }
Попробуйте выполнить:
ngAfterViewInit() {
$('.ultimasExecucoes').easyTicker({
visible: 1,
interval: 4000
});
}
В моем шаблоне
<div class="ultimasExecucoes">
<ul>
<li *ngFor="let workFlow of execucoesEncerradas">
{{workFlow.nomeWorkFlow}} - Data Início: {{workFlow.dataInicioWf | date : 'dd/MM/yyyy HH:mm:ss'}}
- Data Encerramento: {{workFlow.dataEncerramentoWf | date : 'dd/MM/yyyy HH:mm:ss'}}
- Resultado: {{workFlow.resultadoExecucao}}
</li>
</ul>
</div>
Но на моей странице ничего не происходит. Как я могу добавить плагин jquery?