-
-
Notifications
You must be signed in to change notification settings - Fork 241
NS-angular 4.4.1 unable to retrieve local html snippets with NSHttp #1088
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
Comments
Hi @corne-de-bruin,
The steps I just follow are:
Let me know if I am missing something. I build the project, while using NAtiveScript CLI version 3.3.0. |
Hi @tsonevn I've tried it again with the package json you provided and the nativescript-cli 3.3.0 and it still doesn't work. I've updated the sample project to make it a bit more clear If you see the same result as the below screenshot means that it doesn't work. |
The
It seems that local files are automatically defaulting to JSON as an option to parse which could be improved |
Background:
After we upgraded our app to NativeScript 3.2 and nativescript-angular 4.2 we've ran into the following issue #949.
To solve this we've upgraded nativescript-angular to 4.4.1 and angular to 4.4.5.
But with this version we are no longer able to retrieve html files from the local file system. The content is properly loaded but returned in the error handler of the stream.
You can use the following example to recreate the issue:
https://github.com/corne-de-bruin/retrieve-local-html-example
Just clone the project and run:
In the console you will see that it end's up in the error handler of the request.
If I'm right it's related to the following function in "nativescript-angular/http-client/http-utils.ts"
This tries to parse all local loaded files to JSON.
The text was updated successfully, but these errors were encountered: