Closed knightshade23 closed 6 years ago
This can be closed.... Google was able to come up with a solution.
Sharing here, in case others encounter this
I added the following into my component.ts for the subcomponent:
declare var jQuery: any;
ngOnInit(): void { jQuery('.selectpicker').selectpicker(); }
Full context within the file below:
import { Component } from '@angular/core';
declare var jQuery: any;
@Component({
moduleId: module.id,
selector: 'legion-details-cmp',
templateUrl: 'legiondetails.component.html'
})
export class LegionDetailsComponent{
ngOnInit(): void {
jQuery('.selectpicker').selectpicker();
}
}
If I navigate to a page that is using the class="selectpicker", the elements don't render. If I hit "F5" and refresh the page, they display.
I'm at a loss as to why they do not initially display - but it renders the class useless in my appliation.
![selectrefresh](https://user-images.githubusercontent.com/35356007/34857309-099d2fea-f718-11e7-9c8e-95797d53862a.png)
In case it matters, this is nested within a child component