I am trying to use jquery in angular2 and got this error: ReferenceError: $ is not defined from the following code.
declare var $:JQueryStatic;
export class AppComponent {    
ngOnInit() {    
    var container = $("#contact-us-form");    
    container.css("width", $(document).width()).css("height", $(document).height()).hide();    
    container.find(".modal-content .button-close").click(function(){ this.toggleModalWindow("contact-us-form"); });    
    $("#contact-link").click(function(){ this.toggleModalWindow("contact-us-form"); });    
   }     
}      
How could I resolve this ?
declare var $:JQueryStatic;?$is a very special character both for Angular and JQuery. Try using some other variable name and see if you still get the error.