-2

I wanted to use jQuery's property printThis() to print my view in angular
But it is giving me this error.

Property 'printThis' does not exist on type 'JQuery'.

Dino
  • 7,779
  • 12
  • 46
  • 85
Usman Umer
  • 25
  • 1
  • 6
  • Asking Question without the code snippet in question is not a good practice. You need to include the code that does not work as [formatted text](http://stackoverflow.com/help/formatting).Please read [How to ask a question](https://stackoverflow.com/help/how-to-ask), then Edit your question and improve it – Muhammad Osama Sep 16 '19 at 11:47
  • Possible duplicate of [How to use jQuery with Angular?](https://stackoverflow.com/questions/30623825/how-to-use-jquery-with-angular) – Reactgular Sep 16 '19 at 11:47
  • can you share how did you import jqery and printThis in your code? – Ranjan Adhikari Sep 16 '19 at 12:21

1 Answers1

0

For class , use the bellow code ,

$(".demo").printThis();

For Id , use the below code ,

$('#demo-one, #demo-two, #demo-three').printThis({
  importCSS: false, // option
  header: "<h1>Look at all of my Demo's!</h1>" //option
});

For more information . Visit this document

Pushprajsinh Chudasama
  • 7,772
  • 4
  • 20
  • 43