-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using ngxLocalStorage in sub module ... complains about lsValuePath not being a known property #32
Comments
Hi @syska thanks for reporting. It seems like you are the first one doing this. I'll take a look into this as soon as I can. |
If needed let me know if you need a small repo of the issue. Also, i should mention that some modules will be lazy loaded. Thanks for the fast response. |
Hi @bohoffi Just created a small repo: https://stackblitz.com/edit/angular-ivy-hdgjx6? Maybe it's a simply thing, maybe something needs to be changed to support this. This shows the issues with a module having a component that is using the directives. This is my first stackblitz usage to repo an issue, hope it's usefull. |
This commit removes the default constructor and adds a static `.forChild` method.
@syska I've published |
Holy smokes your the man. That was an extremely fast fix 🥰🥰🥰 I will go tests it later today. It was purely luck i wanted to find a local storage implementation, that handled error cases etc. ... Then sat this feature to remember state in forms ... That was on the road map for the project ... Not sure what it's actually called, I haven't found any other packages that does this ... But not needed since it was here 😁 Thanks a million. |
Describe the bug
Simple test run of the
ngxLocalStorage
directive from https://bohoffi.github.io/ngx-localstorage/ -> Directive:<input type="text" id="txt1" ngxLocalStorage lsPrefix="demo" lsInitFromStorage="true" lsEvent="input" [lsValuePath]="['value']"/>
Just pasted into a component which in defined in a module called
ParthnerSharedModule
Can't bind to 'lsValuePath' since it isn't a known property of 'input'.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I'm really lost or really stupid here ...
The errors goes away if I import the module in my sub module ...
But when accessing the site I get
Error: NgxLocalStorageModule is already loaded. Import it in the AppModule only
So ...
I use the
LocalStorageService
in one of my services which works fine.I most be missing something here ... I can't be the first one doing to ... Please let me know if you need more information.
The text was updated successfully, but these errors were encountered: