Alyle-UI
Alyle-UI copied to clipboard
Add angular universal support
Hi Guys, I'm facing this issue and I think is related to universal since cannot find the navigator because need to use isPlatformBrowser can you add these feature?
/ng-app/node_modules/@alyle/ui/bundles/alyle-ui.umd.js:169
Platform.EDGE = Platform.isBrowser && /(edge)/i.test(navigator.userAgent);
ReferenceError: navigator is not defined
I've found the file where the modifications need to be placed: https://github.com/A-l-y-l-e/Alyle-UI/blob/master/src/lib/src/platform/platform.ts
Hi @BruneXX, this already has universal angular support.
This happens when in your file running on node js document
is defined, you should remove that line that defines document
.
It must be like: (global as any).document
= ...
Although this could be resolved by improving the conditionals in Platform.isBrowser
, I will add it for the next release. Thanks for reporting this.