Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-apollo

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-apollo

An API client for the 7digital Apollo platform built for Angular 2 projects.

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-12.5%
Maintainers
1
Weekly downloads
 
Created
Source

Angular apollo

CircleCI

An API client for the 7digital Apollo platform built for Angular 2 projects.

Installation

npm install angular-apollo

Usage

For a web project:
import { bootstrap }    from '@angular/platform-browser-dynamic';
import { HTTP_PROVIDERS } from '@angular/http';
import { Config } from 'angular-apollo';

export class AppComponent {
    constructor(private playlistService:PlaylistService){
        return this.playlistService.findById(10)
            .subscribe((playlist) => {
                this.apolloId = playlist.id;
            }) ;
    };
}

class MyConfig extends Config {
    baseUrl: 'http://www.example.com';
}

bootstrap(AppComponent, [
    HTTP_PROVIDERS,
    PlaylistService,
    ApiService,
    {
        provide: Config,
        useClass: MyConfig
    }
    ]]);
For an ionic2 project:
import { ionicBootstrap } from 'ionic-angular';
import { HTTP_PROVIDERS } from '@angular/http';

export class AppComponent {
    constructor(private playlistService:PlaylistService){
        return this.playlistService.findById(10)
            .subscribe((playlist) => {
                this.apolloId = playlist.id;
            }) ;
    };
}

ionicBootstrap(AppComponent, [{
      provide: ApiService,
      useFactory: (http: Http) => {
          new ApiService(http, {baseUrl:'https://www.example.com'})
        }, 
      deps: [Http]
    },
    PlaylistService,
    ApiService]);

FAQs

Package last updated on 17 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc