mooalot / alphabetical-scroll-bar

A way to navigate alphabetically organized content.
MIT License
8 stars 4 forks source link

not compatible with Angular Ivy #5

Open cytrics opened 1 month ago

cytrics commented 1 month ago

Hey, would it be possible to update the alphabetical-scroll-bar to angular 17? It's a really cool component and currently I get the error "This likely means that the library (alphabetical-scroll-bar) which declares AlphabeticalScrollBarModule is not compatible with Angular Ivy" Thanks already and would be really cool

mooalot commented 1 month ago

Hi, you can use the https://www.npmjs.com/package/index-scrollbar package in your angular project. Its the same thing, just built using stenciljs instead. Youll have to use CUSTOM_ELEMENTS_SCHEMA and defineCustomElements like in this example in your app.module.ts

`import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component'; import { defineCustomElements } from 'index-scrollbar/loader';

defineCustomElements(window); @NgModule({ declarations: [AppComponent], imports: [BrowserModule], providers: [], schemas: [CUSTOM_ELEMENTS_SCHEMA], bootstrap: [AppComponent], }) export class AppModule {} `

cytrics commented 1 month ago

Hi, yes, thank you, that's exactly what I need :-)

BR,