Questions tagged [sharedservices]

23 questions
0
votes
0 answers

Not able to get the data from shared service to component in angular 2

In our Angular 2 project. I am trying to use shared services for communication between two components. We've a BotData.SharedService.ts file like this: import { Injectable } from '@angular/core'; import { BehaviorSubject } from…
smitesh
  • 1
  • 1
0
votes
2 answers

How to Communicate between 2 Direct Child Components of AppComponent via Shared Service in Angular?

So I have read, but not found a solution to my problem. My question is as my title asks. Here is my issue, I have created 2 components (NavbarComponent and HomepageComponent). NarbarComponent is nested in AppComponent and handles the authentication…
Andrew Lobban
  • 2,065
  • 2
  • 24
  • 38
0
votes
3 answers

Angular2 trying to get item in an array before array is populated

I have an Angular2 service as follows. I am trying to use this as a shared service between multiple components. If it matters, the components are binding directly to the public books, and selectedBook properties I want to cache the list of books and…
Danny Ellis Jr.
  • 1,674
  • 2
  • 23
  • 38
0
votes
1 answer

Angular2 (final release) components fail to communicate via observable in a service

I'm using Angular v2.1, I'm trying to make components send messages via a shared service. I want firstly send data from the first component company.component.ts to the second component modal.component.ts. I don't know exactly where's the problem…
Mourad Idrissi
  • 3,455
  • 5
  • 17
  • 29
0
votes
1 answer

cakephp 3 on live shared server intl PHP extension

I have cakephp3 application and along with other installation requirements intl PHP extension is not supported on shared servers iPage and Hostgator is there some alternative or to run cakephp3 on shared server and what is this intl PHP extension…
alamnaryab
  • 1,480
  • 3
  • 19
  • 31
0
votes
3 answers

Why is my shared service not updating across my components?

In my Angular2 app I am bootstrapping an auth service LocalStorage that I want shared across my components: bootstrap(AppComponent, [ ROUTER_PROVIDERS, LocalStorage ]); LocalStorage is defined as follows: import {JwtHelper} from…
-1
votes
2 answers

How to share data between two different components?

i'm trying to share a list of selected items from a component to an other one. i created a service to declare the list : public selectedTasksToUnassign = []; then in this component i try to set the list values: component_1.ts checkTask(task) { if…
SS_FStuck
  • 231
  • 1
  • 5
  • 20
-1
votes
2 answers

How can I differentiate shared service from other service in angular 6+?

I use to hear the term that uses shared services for sharing data between non-relevant components in angular. But every service is a shared service or not? if it is, then how it is different from shared services?
Muhammad Arqam
  • 119
  • 1
  • 5
  • 13
1
2