I\'m developing an application using angular 6. My application use Minton Theme . I included all theme scripts in the index.html file of my angular project. Bu
Here is an example I hope helps. It is not exactly what you need but I'm hopping you can find parts that will save your time:
import { Component, OnInit, AfterViewInit } from '@angular/core';
import { Router } from '@angular/router';
import * as $ from 'jquery'
import { Globals } from '../helpers/globals';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit, AfterViewInit {
title = 'dashboard-app';
authentication = false;
constructor(private globals: Globals) {
}
ngOnInit() {
// this.helpers.logout();
// this.router.navigate(['/login']);
}
ngAfterViewInit() {
// loading templates js after dom render
$.getScript("../plugins/custombox/dist/custombox.min.js", function () {
});
$.getScript("../plugins/custombox/dist/legacy.min.js", function () {
});
$.getScript("/assets/js/jquery.core.js", function () {
});
$.getScript("/assets/js/jquery.app.js", function () {
});
}
}