NativeScript: ATOB() and BTOA() methods not working
I’m running 2.5 nativescript with 2.4 angular. I’m building on android, i haven’t tested ios.
In a pure js or angular2 app, atob() and btoa() work as expected. However, within an angular 2 nativescript app, those methods appear to somewhat pause the code but throw no errors at all.
Is this a known issue? Is there a fix?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 36 (12 by maintainers)
Android
IOS
@dlucidone ☝️
@mast3rd3mon there are native methods that can handle encoding/decoding of base64 for you in few lines of code. Example given by @triniwiz here
Perfect, we can generate PDFs with {N}! 👍 https://play.nativescript.org/?template=play-ng&id=OGrw9s&v=13
@triniwiz Thanks a lot
@mast3rd3mon perhaps you can use custom implementation like this one
NativeScript works with the native mobile APIs and not with the DOM and those methods require a Window object which is simply non-existent in both Android and iOS. You can use Angular in NativeScript but not the DOM related properties and methods.