0

I have used angular component in jquery datatable but it is not getting displayed.

1 Answer 1

1

Can you please supply more data? code? In general, using jQuery with Angular is really not recommended. jQuery runs outside the cycle of Angular and therefor does not update.

if you wanna keep using jQuery you should trigger the change detector ref.

Inject the following in your component constructor

constructor(
    ...
    private cd: ChangeDetectorRef,
    ...
)

after you generate the table, add the following line of code

this.cd.detectChanges();

Again, I highly recommend using angular component & packages only

Hope this helps!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.