0

私は結果を取得しようとしていますが、それをオブザーバブルで割り当てようとしていますが、取得できません。誰か助けてください。

 import { Injectable } from '@angular/core';
 import {Component} from '@angular/core';
 import {Http, Response, Headers} from '@angular/http';
 import {Observable} from 'rxjs/Observable';
 import { IStudent1 } from '../interface';
 import { IStudent2 } from '../interface';
 import {ROUTER_DIRECTIVES} from '@angular/router';
 import {GetSocietyList} from './service'
  import {FORM_DIRECTIVES, FormBuilder, FormGroup, Validators, REACTIVE_FORM_DIRECTIVES} from '@angular/forms';

  @Component({
      selector: 'Search',
      templateUrl:  './components/search/search.html',
      directives: [ ROUTER_DIRECTIVES, FORM_DIRECTIVES,    REACTIVE_FORM_DIRECTIVES],
       providers : [GetSocietyList],
       inputs : ['form']
    })

    export class Search {
    property:any = 'Add';
     data: string;
     form: FormGroup;
    prop: string = 'connenct';
    details: IStudent1[];
     details1: IStudent2[];

       constructor(fbld: FormBuilder,public http: Http,private _profileservice:GetSocietyList) {
      this.details = [];
      this.http = http;
       this._profileservice.getSocietyList()
        .subscribe(details => this.details = details);

        console.log(this.details);
   this.form = fbld.group({
        name: [''],
        age: ['', Validators.required],
        class: ['', Validators.required],
        grade: ['', Validators.required]

    });

}


   edit(id): any {
//console.log(id);
this.property = 'update';
var headers = new Headers();
headers.append('Content-Type', 'application/x-www-form-urlencoded')
this.http.get('http://localhost/a2server/index.php/profile/editprofiledb/' + id, { headers: headers }).map(res=> res.json());}


}

私は結果を取得しようとしていますが、それをオブザーバブルで割り当てようとしていますが、取得できません。誰か助けてください。

4

1 に答える 1