Questions tagged as 'angular2-http'

0
answers

Angular 2 bug in url after auto compile

Whenever my Angular app auto compiles, the url is never restarted but my app goes back to the home page anyway. So if I'm at the following URL: http://localhost:4200/alguma-url So I make some changes to the code, Angular 2 auto compiles to...
asked by 29.05.2017 / 19:13
0
answers

Intercept all HTTP requests from angular2

I am looking for a way to intercept all HTTP requests made by angular and add some headers . In versions prior to angular2 RC5 (before NgModule ) it was this way, for example: class MyOptions extends BaseRequestOptions { Auth...
asked by 30.09.2016 / 20:32
0
answers

Authentication with Ioni2, Angular 2

I have the ts class AuthProvider import { Injectable } from '@angular/core'; import { Http, Response, Headers } from '@angular/http'; import 'rxjs/add/operator/map'; @Injectable() export class AuthProvider { baseUrl:string = 'http://tutaap...
asked by 18.07.2017 / 03:25
1
answer

Angular2 ngFor help with loop

I have a file 'nvi.json' which looks like this: [ { "abbrev": "gn", "book": "Gênesis", "chapters": [ { "1": { "1": "...", "2": "..." } }, { "2": { "1": "...", "2": "..." } }, { "3": {...
asked by 22.11.2016 / 20:14
2
answers

Cast TypeScript (ERROR TypeError)

The problem is as follows, through a service ( ModeloService ), I get an array of Modelo , where Modelo is a class, I happen to be unable to access the methods of this class, since cast in the service is not being done...
asked by 12.01.2018 / 19:25
1
answer

Non-Angular Rotation 5 dynamically mounted

I have a dynamic menu mount in the angle. The assembly is done as follows: <ul class="pcoded-item pcoded-left-item" item-border="none" item-border-style="solid" subitem-border="solid" *ngFor="let asideItem of asideItems.views"...
asked by 13.08.2018 / 13:48
0
answers

How to use Observable to read another javascript file

In the company I work for I am forced to deal with some gambiarras and this is one more of them. It is as follows. I have an application in Angular 6 and I need to get the data from a .js file which is on a server that I do not have access to...
asked by 02.07.2018 / 06:49
1
answer

How to pass a GET parameter on a URL in Angular 4+? Using the route system

I need to insert a get parameter after entering the page with the URL. For example: I clicked here x went to the page and. link ? = parametroGet In case this GET parameter will be an ID, which I will pass when the user clicks the s...
asked by 22.05.2018 / 14:57
0
answers

Authorization Angular Token 2

Good afternoon. I'm having trouble sending a token in the GET request using Angular. I'm sending the token string straight into the header, and in the backend it comes as null. My api already has the necessary headers to avoid cors problems, the...
asked by 19.05.2018 / 22:08