Load Document.Ready function on Routing navigation in angular 4-5-6-7-8
write your all document.ready code in one single jquery function and call that function on document.ready.
use this function on typescript.
use this function on typescript.
import { Component, OnInit } from '@angular/core';
declare function main_init():any;
declare function common_init():any;
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {
constructor() { }
ngOnInit() {
main_init();
common_init();
}
}
Comments
Post a Comment