Skip to content
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

Cannot import Truly UI component #323

Closed
JPGygax68 opened this issue Jul 24, 2019 · 3 comments
Closed

Cannot import Truly UI component #323

JPGygax68 opened this issue Jul 24, 2019 · 3 comments

Comments

@JPGygax68
Copy link

I needed to access a Truly-UI component from my component code, and did this:

@ViewChild('browsingPanel') private browsingPanel: TlOverlayPanel;

VSCode generated the following import statement for me:

import { TlOverlayPanel } from 'truly-ui/components/overlaypanel/overlay-panel';

but Angular has a problem with it:

Module not found: Error: Can't resolve 'truly-ui/components/overlaypanel/overlay-panel' in 'D:\Training\electron\electron-angular-native\src\app\settings

I found no solution online, only the following tidbit .

(I'm working with Electron v4.2.6)

@JPGygax68
Copy link
Author

I've experimented on stackblitz and determined that there, it is apparently possible to import TlOverlayPanel directly from truly-ui - even though the Stackblitz editor underlines the import statements in red!

This is very strange. Updating Truly UI from 4.1.3 to 4.2.0 did not help either. I see that Stackblitz uses Angular 8 though, while I'm still at 7. I will try upgrading and report again.

@WilliamAguera
Copy link
Member

This happen because the class is not exported on lib, but we are fixing this issue, we are aware of it. For now, to do ViewChild you just remove the class and it will work as well.

like this: @ViewChild('browsingPanel') private browsingPanel;

@abalad
Copy link
Member

abalad commented Jul 26, 2019

Fixed, install with command npm install truly-ui@dev --save until we ship a new version for production with the correction

@abalad abalad closed this as completed Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants