How to use boostrap's js,typescript in angular5 to compile an error, and how to solve it?

using $("- sharpid"). Modal ("open") Times error is as follows:

ERROR in src/app/components/navbar/navbar.component.ts(77,5): error TS2304: Cannot find name "$".

add a reference

import * as $ from "jquery";

use $("- sharpid"). Modal ("open") or report an error:

ERROR in src/app/components/navbar/navbar.component.ts(77,21): error TS2339: Property "modal" does not exist on type "JQuery<HTMLElement>".

could you tell me how to solve the problem?


try npm install-- save @ types/jquery . It should be that the type description file of jquery is not loaded


replace import * as $from 'jquery'; with declare var $: any; should work

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5b623-4563b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5b623-4563b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?