algolia / angular-instantsearch

⚡️Lightning-fast search for Angular apps, by Algolia
https://algolia.com/doc/deprecated/instantsearch/angular/v4/api-reference/instantsearch/
MIT License
261 stars 73 forks source link

compatibility between Angular 16 and Angular-instantsearch #1002

Open siwarsel opened 1 year ago

siwarsel commented 1 year ago

I migrated from angular 15 to angular 16, knowing that I am using angular-instantsearch, when I build my project, I get these errors. (All my components are marked as standalone component and contain all necessary imports, and my project works perfectly with angular 15.)

image

Can someone please help me, and tell me if these errors are related to angular-instantsearch not supporting angular16 or not, and if there is any update information for angular-instantsearch.

b-abdallah commented 1 year ago

I am interested

msanthoshofficial commented 1 year ago

Maybe you should import it like this ?

import {LibraryModule} from 'ngmodule-based-library';

bootstrapApplication(PhotoAppComponent, {
  providers: [
    {provide: BACKEND_URL, useValue: 'https://photoapp.looknongmodules.com/api'},
    importProvidersFrom(
      LibraryModule.forRoot()
    ),
  ]
});
SuhasParameshwara commented 1 year ago

@siwarsel Did you find the solution?

gethari commented 1 year ago

@siwarsel by any change did you get a solution to this ?

pascalconfluent commented 8 months ago

I have the same issue. If I declare my component this way:

@Component({ selector: 'app-root', standalone: true, imports: [RouterOutlet, NgAisInstantSearchModule], templateUrl: './app.component.html', styleUrl: './app.component.css', })

I get a TS-992012

Also tried with importProvidersFrom(NgAisInstantSearchModule.forRoot()) and that gives me a TS2322

Any idea on how to solve it?