ASPNETZERO v11.1.0, Angular, .NET 6.0
I want to make use of Metronic's noUiSlider in my Angular application but I can't figure out how... Unfortunately, there is no information about how to make use of certain components in Angular in Metronic's documentation.
Please, give me some instructions on how to make use of it!
Maybe also add it to 'Demo-UI-Elements'-page in ASPNETZERO-demo-application.
4 Answer(s)
-
0
Hi @alexanderpilhar
nouislider is not included in AspNet Zero by default. You can install it as shown in https://refreshless.com/nouislider/download/ and then add it to angular.json file. After that, you need to add below line to typings.d.ts;
declare let noUiSlider:any;After all, you can use nouislider in any page you want.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @ismcagdas and thank you for your fast response!
Could you please elaborate on what exactly I have to add to
angular.jsonfile!?So far, I tried the following (without success):
- Adding
nouislidertoallowedCommonJsDependencies - Adding theme ressources
src/assets/metronic/themes/default/plugins/global/plugins.bundle.cssto styles and addingsrc/assets/metronic/themes/default/plugins/global/plugins.bundle.jsto scripts
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) - Adding
-
0
Hi,
plugins.bundle.js doesn't contain nouislider. So, you need to add below lines to scripts and styles of angular.json;
"node_modules/nouislider/nouislider.js","node_modules/nouislider/nouislider.css",I assume you already runned
yarn add nouisliderornpm install nouisliderin your angular project.Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Alright, for whatever reason I thought I could use Metronic's ressources... My bad.
Still, the result is not working very well:

Anyway, I'm not going to try and get it right with noUiSlider. PrimeNG's Slider component works as expected and is all I need, so I switched to that one.
Thank you for your help!
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)