angular2-services Questions
8
Solved
I want to implement autocomplete feature , so an identical option i found was using multi-select drop-down. So i used this module -
https://www.npmjs.com/package/ng-multiselect-dropdown
But after...
Kisangani asked 22/10, 2018 at 8:50
8
Solved
getHeroes (): Observable<Heros[]> {
return this.http.get(this.heroesUrl)
.map(this.extractData)
.catch(this.handleError);
}
Where I add the headers and how? looking for a simple example...
Bastinado asked 20/2, 2017 at 19:32
6
Solved
I am trying to remove duplicate value objects in an array but not working... I think duplicate function is working but not reflecting in li list. Can you find out where I have to change?
My servic...
Seniority asked 5/12, 2018 at 17:10
4
Solved
I'm am trying to use withCredentials to send a cookie along to my service but can't find out how to implement it.
The docs say "If the server requires user credentials, we'll enable them in the req...
Credulity asked 27/7, 2016 at 14:2
4
Solved
My Angular 2 app has a logout feature. We want to avoid doing a page reload if we can (i.e. document.location.href = '/';), but the logout process needs to reset the app so when another user logs i...
Coriecorilla asked 5/4, 2017 at 14:40
6
Solved
Kindly explain the difference between @Self and @Host.
The angular API documentation gives some idea. But it's not clear to me.
The example provided for Self uses ReflectiveInjector to exemplify u...
Cristie asked 1/5, 2017 at 23:41
2
Solved
I am trying to use a injected dependency within a static method and of course the injected dependency is instance-scoped and can't be used within the static method.
Here is my class:
@Injectable(...
Inhabitancy asked 19/7, 2016 at 11:2
3
Solved
It is giving responce.json () is not a function for my case.
File component.ts
this.AuthService.loginAuth(this.data).subscribe(function(response) {
console.log("Success Response" + respo...
Donate asked 13/2, 2017 at 11:29
16
Solved
I've read that injecting when bootstrapping should have all children share the same instance, but my main and header components (main app includes header component and router-outlet) are each getti...
Barbusse asked 24/3, 2016 at 11:10
2
I am creating Progressive-web-app application ,I want to store user information in local device. So, how can i do this.how can I store user login information,so that he does not have to login again...
Testa asked 15/2, 2018 at 12:24
5
Solved
I have a ConfigService written to get the configuration details before the angular app bootstraps.
The following code is written in the app.module.ts this code works fine and I am able to load the...
Armendariz asked 7/8, 2017 at 19:7
2
Solved
I was using EventEmitter and @Output in Angular services, today one of the colleagues mentioned it's not a good practice.
I found this post mentioning it's a bad practice and it seems mostly is per...
Stites asked 1/6, 2018 at 16:32
3
Solved
In Angular, I have a service that has few things injected through the constructor(...). However that service is also at some place created by calling the constructor. Therefore, adding another serv...
Champaign asked 20/7, 2017 at 21:41
6
Solved
I searched in many forums, questions, in doc but can't find the correct solution.
Problem
What is the best way to increment a value using angularfire2 ?
I saw we could use [transaction()][] but ...
Sikkim asked 4/3, 2017 at 13:59
3
I'm trying to implement a filtering mechanism in a new Angular2 app, that would allow me to filter a list of entries in an array. The entries may have around 20 properties that could be filtered on...
Sweeten asked 21/12, 2016 at 14:9
2
Solved
Is there a way to just tell the server to update data without subscribing? Skipping a return statement and a subscription seems to render the http call inert.
In my case, my DB guy created a bunch...
Bunt asked 29/7, 2016 at 16:22
3
Solved
I want to create a service which detects all keyboard input, translates the key strokes into actions based on a configurable mapping, and exposes observables which various elements can bind to to r...
Vendace asked 20/9, 2016 at 11:33
22
By using Http, we call a method that does a network call and returns an http observable:
getCustomer() {
return this.http.get('/someUrl').map(res => res.json());
}
If we take this observab...
Deplorable asked 28/3, 2016 at 21:55
6
I am using a back-end server (Java Spring) that has Pager enabled. I am loading 100 records per page on a HTTP call.
On angular2 service, it is consuming the API call with "?page=1&size=100" ...
Mispickel asked 21/6, 2017 at 7:51
4
Solved
Service module:
import { Observable } from 'rxjs/Rx';
import { Http,Response} from '@angular/http';
import { Injectable } from '@angular/core';
import 'rxjs/add/operator/Map';
@Injectable()
export...
Dori asked 21/5, 2017 at 0:22
4
I have a form in my angular 2 Project.
I know how to Retrieve data from the API. But don't know how to Perform a CRUD operation in there.
Can anybody help me with the simple codes on How to Send ...
Obduce asked 17/12, 2016 at 5:38
2
Solved
I have 2 services one.service.ts and two.service.ts, and a component dashboard.component.ts.
How to conditionally inject those service into the component?
import { Component, ViewEncapsulation, Inj...
Sinistrodextral asked 17/4, 2017 at 11:8
5
Solved
I've read questions like Access EventEmitter Service inside of CustomHttp
where the user uses EventEmitter in his service, but he was suggested in this comment
not to use it and to use instead Obse...
Duckpin asked 18/3, 2016 at 5:20
8
Solved
In my Angular 2 component I have an Observable array
list$: Observable<any[]>;
In my Template I have
<div *ngIf="list$.length==0">No records found.</div>
<div *ngIf="list$...
Intrauterine asked 27/6, 2016 at 15:13
4
I have a simple Flask app running that returns a string
and my Angular2 code has been cobbled together from various tutorials that I've seen online
webservices.services.ts
import { Component, On...
Swope asked 12/5, 2017 at 0:9
1 Next >
© 2022 - 2024 — McMap. All rights reserved.