[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[x ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:
AkitaNgDevtools isn't working when it's being imported to a module which is lazy loaded (unlike StoreDevtoolsModule of ngrx for example).
For AkitaNgDevtools to work with a lazy loaded module.
Something like AkitaNgDevtools.forFeature().
Although it seems unlikely, sometimes we want an app which only part of it will implement Akita.
Angular version: 7.1.0 beta
Browser:
- [x ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: XX
- Platform:
Others:
I'm not sure what you mean as Akita dev-tools works with lazily loaded modules. What is the problem?
@NataneBasal
Oh, well I either implemented it in a wrong way or its a bug.
When I try to import Akita dev-tool to the lazy loaded module, its simply not working.
But when I import it to AppModule its work perfectly.
Can you create a simple demo on stackblitz or upload a simple demo to GitHub, please?
Can you create a simple demo on stackblitz or upload a simple demo to GitHub, please?
https://stackblitz.com/edit/angular-pvyj9v
*might need to hard reload between changes.
Why do you need to inject it in a lazy load module?
This part of our app needs to be lazy loaded and this is the only part (for now) which implements Akita.
I understand this is a very unusual scenario but this is due to the nature of this app being used for training and experiment purposes.
I will try to investigate, but can't promise anything :)
That's fine, we still love Akita and looking forward to use it more extensively in the future!
You can't use the AkitaNgDevtools.forRoot() module as it relies on the application bootstrap process. But it works with the underline API.
import { akitaDevtools } from '@datorama/akita';
akitaDevtools(); <======
const routes: Routes = [
{ path: '', component: LazyLoadedComponent }];
@NgModule({
imports: [
CommonModule,
RouterModule.forChild(routes)
],
providers: [ExampleQuery, ExampleStore, ExampleService],
declarations: [LazyLoadedComponent],
})
export class LazyLoadedModule { }
Most helpful comment
You can't use the
AkitaNgDevtools.forRoot()module as it relies on the application bootstrap process. But it works with the underline API.