Skip to content

Instantly share code, notes, and snippets.


doggy8088/app.component.html Secret

Last active Feb 5, 2017
What would you like to do?
import {Http} from '@angular/http';
import { Component } from '@angular/core';
import 'rxjs/add/operator/map';
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
export class AppComponent {
data: any;
constructor(private http: Http) {
ngOnInit() {
let url = ''; = this.http.get(url).map(x => x.json());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment