I am currently working with a 2 part process that involves importing a list of usernames in Component 1, submitting it to a service, and then using the returned user profile data in Component 2.
The issue I am facing is that when I receive the data back from the observable I am subscribed to, the desired action I intend to perform does not seem to be triggered.
Component 1:
import { Component, EventEmitter, NgModule, OnInit, Output } from '@angular/core';
import { FormControl, FormGroup, FormBuilder, Validators } from '@angular/forms';
import { MassEmpService } from "app/mass-change/shared/mass.service";
import { Observable } from 'rxjs/Observable';
// Other code for Component 1...
Component 2:
export class EmployeeSelectionComponent implements OnInit {
// Define our search results
public searchResults: ImportResults[] = [];
constructor(
private _massEmpService: MassEmpService
) {
}
// More code for Component 2...
Service:
import { Injectable } from '@angular/core';
import { Http, Response, Headers } from '@angular/http';
import { FrameworkService } from '@aps/framework';
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
@Injectable()
export class MassEmpService {
// Relevant code for the MassEmpService...
The Question:
In Component 2
, I am encountering an issue where I am unable to trigger the intended action upon receiving data back from the observable. It seems like I am not reaching the completion stage of the observable. Any insights on what could be causing this behavior?