Guest User

ts

a guest
Oct 10th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import { Injectable } from '@angular/core';
  2. import { Http } from '@angular/http';
  3. import { Observable } from 'rxjs/Rx';
  4. import 'rxjs/add/operator/map';
  5.  
  6. import { getDrupal } from '../models/getDrupal';
  7.  
  8. @Injectable()
  9. export class getDrupalDatas {
  10. drupalApi = 'http://drupal2ionic.maison/api';
  11.  
  12. constructor(public http: Http) { }
  13.  
  14. // Load all github users
  15. load(): Observable<nid[]> {
  16. return this.http.get(`${this.drupalApi}/articles`)
  17. .map(res => <nid[]>res.json());
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment