Http error with final release of angular2
See original GitHub issueI’m trying to make an http request (post or get) but as soon as the functions is called the app closes and shows the error:
JS ERROR Error: Error in login/login.component.html:9:51 caused by: null is not an object (evaluating '_angular_platformBrowser.__platform_browser_private__.getDOM().getCookie')
I am injecting the http object in the constructor, I’m importing it in the NgModule, I don’t know what could it be… I have done this before in Angular2 rc4 but I’m not being able to do it now.
EDIT: I made a little improvement, I changed the HttpModule in the NgModule for NativeScriptHttpModule and now it doesn’t crash but enters in the function when an error occurs and shows: Response with status: 200 for URL: null
Issue Analytics
- State:
- Created 7 years ago
- Comments:13
Top Results From Across the Web
"Error: Angular requires Zone.js prolyfill" - Stack Overflow
I have upgraded from RC4 to the Final release of Angular2. When I run npm start , the app is stuck on 'Loading...'...
Read more >Angular version 2.0.0 released!! | juri.dev
After two years of intense development it has now been officially released.
Read more >Server-side rendering (SSR) with Angular Universal
This engine's Promise callback returns the rendered page to the web server, which then forwards it to the client in the HTTP response....
Read more >Testing Angular 2 Services and Http with Jasmine
Just checked in an update. It's good with the latest Angular 2 release too, so it's probably a coding error of some sort,...
Read more >48 answers on StackOverflow to the most popular Angular ...
Importing lodash into angular2 + typescript application ... I've got the following error when launching my Angular app, even if the component is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
By default iOS doesn’t allow requests over non https, but you can enable it. You can add the following to your
Info.plist
underapp_resources/iOS
.Note changing this file means you need to re build your app with
tns build ios --emulator
See this issue https://github.com/NativeScript/NativeScript/issues/1881
We had the exact same problem, you actually need to use this:
import { NativeScriptHttpModule } from "nativescript-angular/http";
Add that to your
app.module.ts
and into yourimports