SHARE
TWEET

ts

a guest Oct 10th, 2016 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top