Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Injectable } from '@angular/core';
- import { Http } from '@angular/http';
- import { Observable } from 'rxjs/Rx';
- import 'rxjs/add/operator/map';
- import { getDrupal } from '../models/getDrupal';
- @Injectable()
- export class getDrupalDatas {
- drupalApi = 'http://drupal2ionic.maison/api';
- constructor(public http: Http) { }
- // Load all github users
- load(): Observable<nid[]> {
- return this.http.get(`${this.drupalApi}/articles`)
- .map(res => <nid[]>res.json());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment