Commit 6df98e85 authored by 神楽坂玲奈's avatar 神楽坂玲奈

apps service

parent f20a7085
import { Injectable } from '@angular/core';
import { Http,Response } from '@angular/http';
//import { Observable } from 'rxjs';
//import 'rxjs/add/operator/map'
import {Injectable} from '@angular/core';
import {Http} from '@angular/http';
import 'rxjs/Rx';
@Injectable()
export class AppsService {
constructor(private http: Http) {}
data = '';
constructor(private http: Http) {
}
data = '';
getApps() {
console.log(123);
this.http.get('./apps.json').map((res) => {console.log(res)})//.subscribe(res => this.data = res);
this.http.get('./apps.json')
.map(response => response.json())
.subscribe(data => this.data = data);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment