SHARE
TWEET
ts
a guest
Oct 10th, 2016
51
Never
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());
- }
- }
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.
