I'm developing an Angular project base on Fomantic-UI framework (that is a fork of Semantic-UI).
I have installed it:
npm install --save fomantic-ui
and then I have added the following lines in angular.json
file:
"styles": [
"node_modules/fomantic-ui/dist/semantic.min.css",
"src/styles.scss"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/fomantic-ui/dist/semantic.min.js"
]
I have also installed types for it with npm install --save @types/semantic-ui
and, according to this, they should work fine with Fomantic-UI.
Anyway this seems not to be enough to use functions such as modal()
, dropdown()
, calendar()
, in fact I get error both within my IDE (Webstorm) and during compile:
TS2339: Property 'modal' does not exist on type 'JQuery<HTMLElement>'.
TS2339: Property 'calendar' does not exist on type 'JQuery<any>'.
TS2339: Property 'dropdown' does not exist on type 'JQuery<HTMLElement>'.
and so on...
Do you know what is the right way to import Fomantic-UI in my project?