Home > Blockchain >  How to use an AngularJS module on Angular
How to use an AngularJS module on Angular

Time:05-18

Right now I need to apply one card carousel in my Angular 13 project. I was trying to find any simple carousel module that doesn't need bootstrap (as I am using Bulma), jquery, or lots of dependencies and found this one ui-carousel. But the installation and usage guides of this module describes how to use it on AngularJS, but not specifically about Angular, if it is usable or how to do it. If it isn't applicable, or even if it isn't the best, which other alternative module could I use?

CodePudding user response:

as described in the doc, first you need to install the dependency:

npm install angular-ui-carousel --save

after that, just follow the dependency injection guide, by using:

import { UiCarousel } from 'ui.carousel'; (or whatever autoimport says)

and declaring in the module imports:

@NgModule({
imports: [
  UiCarousel
],
declarations: [
  ...
]
})

export class SharedModule { }re

  • Related