220 questions
0
votes
1
answer
386
views
How to read/save HTTP Post response (HTML format) in angular 4
I am trying to read the HTTP Post response in Angular 4. But I cannot able to do. Because the response in HTML format. I searched many sites but I could not found any solution for that.
I can able ...
1
vote
2
answers
541
views
i want to add credentials to window.open(url) in angular6
Code output
i am having this issue in window.open
below is code
repourl:any='http://192.168.1.104/....'
ngOnInit() {
var params = {
Username: 'd2kuser',
Password: '****'};window.open(this....
0
votes
2
answers
3k
views
how to remove authorization Bearer in angular 4 post API call
Need to remove Authorization Bearer in POST Call
Below code didnt remove the authorization bearer which is coming from http interceptors.
Status code: 403 Unauthorized RequestAuthorization header is ...
0
votes
1
answer
1k
views
How to post the Form data using template driven forms using angular 4
I want to post the request payload data on submit the form fields as post API:
Facing issue with the 400 bad request.
How to pass the request payload with the form details?
component.html
<form #...
1
vote
1
answer
59
views
How to pass locale in get service call using angular4
Need to find the locale and pass the same to service(get) call :
Property 'indexOf' does not exist on type '() => string[]'
Heading
in angular4.
//Call Languages
getshortLanguages() {
...
-2
votes
1
answer
568
views
ERR_CONNECTION_TIMED_OUT
enter image description herei have call Post/Get api when running app they show me error ERR_CONNECTION_TIMED_OUT in angular4
0
votes
0
answers
64
views
Called Api Once and used many component in Angular 4?
I have two component Master and MasterDetails and one service name MasterService when first time load master component its working fine but if I navigate to MasterDetails component then I get blank ...
1
vote
0
answers
416
views
Network detection in angular or http client proper error
I have two questions.
angular httpclient get method returns unknown error when I have lost my internet connection.
another question is when I tried navigator.onLine its always returning true.
after ...
1
vote
1
answer
3k
views
Type 'Headers' is not assignable to type 'HttpHeaders | { [header: string]: string | string[]; }'
AuthServiceProvider
postData(credentials, type){
return new Promise((resolve, reject) =>{
let headers = new Headers();
this.http.post(apiUrl+type, JSON.stringify(credentials), {...
-1
votes
1
answer
363
views
How to pass json obj value to API in angular (for post method)
Here i am trying to post some data to API.but it does not work.because i have got 400 bad request.i think my service or typescript is not fine.when trying to postman I got the output.so i confirm my ...
-1
votes
3
answers
110
views
How to pass the headers separatelyin angular4(when passing json object to API not working)
Here I'm trying to catch and save some data to DB (post method)using angular 4.when clicking the confirm button got an error like blocked by CORS policy: Response to preflight request doesn't pass ...
0
votes
1
answer
353
views
Accordion Menu in home page
Create New Ionic 3 and Angular 4 Accordion Menu App
I really wanted to view this Accordion Menu in my home page for my project i tried to edit this code so many time but i wasn't able to did it right....
0
votes
2
answers
502
views
How to call/Get the out parameter from an API to Angular4
Here I am working with a post method on angular 4 web app.When entering data and click the confirm button the values(data) are saved to the db.It works successfully, but my problem is at the same time ...
0
votes
1
answer
198
views
How can we get playstore app version in ionic 3 application?
I have tried so many solutions from google, but no any luck, I didn't get proper solution. How can i get app version from Playstore?
1
vote
1
answer
820
views
Variable value is not visible in intercept method- HTTP Interceptors Angular
I'm trying to pass the variable value in the headers of HTTP request using HTTP Interceptors. But it's not happening
I have tried passing the variable from AppComponent to Service. I can see the ...
0
votes
1
answer
103
views
how to use the map() method of angular4 using "rxjs": "~6.3.3" and "rxjs-compat": "^6.5.2", in the package.json file
In my package.json file, I've "rxjs": "~6.3.3" and "rxjs-compat": "^6.5.2".With this I'm trying to use the map() method in a service of my project
whenever, I'm running ng serve, I'm getting this ...
0
votes
1
answer
210
views
Promises inside foreach in angular 4/typescript
How is the best way to call a promise inside a foreach?
I have an array and need to send each item to RestFull API.
But at the same time, I have to check if the response its true ( i have a counter '...
1
vote
1
answer
474
views
Node-red HTTP GET Request in Angular 4 webapp
I'm building a service that use Node-red only to send email when a GET request to 127.0.0.1:1880/hello (node-red port) are triggered and an Angular 4 webapp (127.0.0.1:3000) to client access.
When i ...
0
votes
1
answer
3k
views
How to prevent login prompt in chrome for 401 Unauthorization error for Basic Authentication
The server was responding with 401 error code against an ajax call and
that’s why my chrome browser was throwing an ugly login prompt box,
before even my client side 401 handlers were called.
1
vote
3
answers
62
views
Variable data not retained to bind in HTML even after assigning data to it inside a subscribe() function
I have below app-product.ts code written as below:
@Component({
selector: 'app-product',
template: `
<div>
<h2>{{products.prod_name | uppercase}} Details</h2>
&...
0
votes
0
answers
49
views
How to do visible component if backend refresh token success
Method in authService, which send request to backend server and get response as json with access token
refresh() {
if (JSON.parse(localStorage.getItem('auth')) !== null && JSON....
0
votes
1
answer
10k
views
Post Excel file/Blob to Rest API using Angular 4
I am using input type with file to upload a excel file like below :
<input type="file" style="display: inline-block;" (change)="readFile($event)" placeholder="Upload file" accept=".xlsx">
&...
0
votes
0
answers
100
views
Open a web page with header values in Angular 6
Background: We have two legacy ASP.NET MVC websites and both websites talk to each other.In one of the cases we are redirecting the user from one application to another, in this case the application ...
0
votes
1
answer
430
views
How to get data and call api based on another api call's data
I am trying to call api and, if returns any data then i have to display that data else, i will call another api to get data.
I have service that gets data to me. If there is any data then i will use ...
11
votes
2
answers
31k
views
Can't have a timeout of over 2 minutes with this.http.get? [duplicate]
My angular 4.3.2 code is calling my back-end service that takes 2-4 minutes to return. Using just the default this.http.get code, I see that the default timeout kicks in after 2 minutes. However when ...
0
votes
2
answers
247
views
Angular 5: My response don't overwrite default property
I try to bind data in my html view, but my response don't overwrite default property value. From the API I get good response.
feedback.statistics.model.ts
export class FeedbackStatistics {
...
2
votes
1
answer
253
views
response of a request not being same when being accessed in subsrcibe
I have an angular function which makes an HTTP call to a certain end point and i am subscribing the response. But there is a very strange behavior i am getting noticing that when i inspect response of ...
2
votes
1
answer
4k
views
Send Array in Multipart/formdata in angular 7
I am trying to send a JSON array inside formdata and also, other form fields with it. This Json array's fields are generated dynamically. However, it is giving me error 500.
This is how i have to ...
0
votes
2
answers
2k
views
angular 4 typescript validation error Object literal may only specify known properties
my service
import {Account} from '../models/Account';
export class AccountingService {
domain: string = "http://localhost:3000/api";
constructor(private http: HttpClient) { }
getAccounts()...
0
votes
0
answers
2k
views
IONIC Getting 500 "Internal Server error" form Post API Call
I am getting 500 "Internal Server error" form ionic Post API Call, the api is working fine with postman.
I try with jquery ajax call as well inside ionic it is giving the success response, this is the ...
4
votes
1
answer
6k
views
HTTP_INTERCEPTOR for specific routes in Angular 4+
I have created HTTP_INTERCEPTOR, I need it to work on some specific routes and some others not.
At the begining it was in the main app module file,
then I removed it from there and add it in some ...
0
votes
1
answer
36
views
Error facing on communication between asp.net webapi server and angular2 application
I am facing the CORS related issue when i try to connect my angular2 application and asp.net webapi application.
Error:-
register:1 Access to XMLHttpRequest at 'http://localhost:49457/api/UserDetails'...
4
votes
0
answers
228
views
How to send cookie in Request header in office JS task pane app? (Office-js Add-in with angular 4)
Sending cookie in request header (Office-js Add-in with angular 4)
headers.append('Content-Type', 'application/json');
headers.append('Accept', 'application/json');
...
0
votes
1
answer
778
views
edit and delete operation in angular
I'm building a crud operation and was able to do the create operation. Now I'm trying to edit and delete them. I tried getting individual data through service but failed. It would be nice if anyone ...
0
votes
0
answers
56
views
The text starts with # symbol is not inserted into the datatable
I am inserting address by passing address parameter to Service.The Address field contains text Building No 1,#1-98-91/1,Sai Nagar.Now my problem is after data insertion in the mysql database table ...
0
votes
2
answers
325
views
Angular cant make new project
I tried making the new project using AngularCLI like this:
ng new my-app-dream
and it resulted in:
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ...
2
votes
4
answers
8k
views
How to use ForkJoin for sequence of http requests Angular 4
I have a function which makes two http calls, the input of second http depends first http response and I need the two results to be returned at the same time. I have the below code which throws the ...
1
vote
1
answer
585
views
Angular | how to call a ngonit() method from another component
Here the scenario is that i have a header component where i have a selection box . on change of that selection i have to refresh the current page
example:
this seems not working for me
this.router....
1
vote
0
answers
2k
views
HttpClient doesn't returned all response headers
I agree this is a duplicate question but i have tried answers given in other posts and that doesn't work so i am posting mine with my code
I have a situation in which i'm making a GET call with ...
0
votes
2
answers
926
views
Parsing API Response (object) from component to another component in Angular 4
I want to parse API response to another component
This is code from 'detail_item.component.ts', this code sent data to route "bookitem" in 'book_item.component.ts'
onSubmit(){
this.appService....
0
votes
3
answers
883
views
TypeError: Cannot read property 'uid' of null at SwitchMapSubscriber.project
TypeError: Cannot read property 'uid' of null
at SwitchMapSubscriber.project (auth.service.ts:37)
at SwitchMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/switchMap.js....
2
votes
2
answers
6k
views
Cannot instantiate cyclic dependency! AuthService ("[ERROR ->]"): in NgModule AppModule in ./AppModule@-1:-1
getting error
compiler.js:11472 Uncaught Error: Provider parse errors:
Cannot instantiate cyclic dependency! AuthService ("[ERROR ->]"): in NgModule AppModule in ./AppModule@-1:-1
at ...
-1
votes
2
answers
475
views
Empty response in Angular 4 from java backend
I'm new to Angular and I have a problem. I want to get data to my graph from my spring boot backend. I send a GET request from my Angular App and I receive empty response despite seeing in the console ...
2
votes
3
answers
9k
views
How to wait and get response for each HttpClient service call from a loop in Angular 4
I have a situation where I need to run a loop and fetch respective items' description. Then along with the item Ids and other information I have to include the fetched description in a datatable.
...
1
vote
0
answers
533
views
Get updated XSRF token and Cookie after login: Angular 4
I have an app where user logs in and send some requests to nodeJs backend. In my app first I send a dummy request then I get a _csrf and XSRF-token I set these as headers and send login details. In ...
3
votes
3
answers
7k
views
How can I pass a string to a post request in Angular?
I have done some searching and nothing seems to help.
My angular looks like this with username being a string.
getUser(username = null) {
if (username == null) {
username = this.cookie....
1
vote
1
answer
1k
views
angular 2/4 multiple drop down
I am trying to develop two drop downs in my Angular application. The 1st one is shop list and the other one is godown list. When I select a shop it will show it on data.but when I select Godown it's ...
0
votes
1
answer
58
views
How to Create Data Model to be extended in different components/routes
I have a to form a request object for different POST services at different routes.
service 1 takes request Obj as {
fname: '',
lname: '',
age: 23,
....
...etc
}
service 2 takes request as {
...
1
vote
2
answers
56
views
How to wait untill I get the results for HTTP get in angular 4? [duplicate]
export class PropertiesService {
getCommonProperties():any{
let URL: string = "/xxxx/yyyyy";
let headers = new Headers();
let options = new RequestOptions({ headers });
...
0
votes
1
answer
1k
views
Angular 4/5 - How to make api calls using browser client and not the app hosting box
Is there a way an angular application can use user's browser client to make web api calls instead of relying on the box where the app is hosted make those calls?
Will it be a security issue?
How to ...