Skip to content

Instantly share code, notes, and snippets.

@ravipatel2293
Last active May 29, 2019 11:47
Show Gist options
  • Save ravipatel2293/a110e50b373ff57a3e2681be168a71df to your computer and use it in GitHub Desktop.
Save ravipatel2293/a110e50b373ff57a3e2681be168a71df to your computer and use it in GitHub Desktop.
import { ADD_MOVIE } from './movie.actions';
import { Http, Headers, Response } from '@angular/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
@Injectable()
export class MovieStore {
public movieStore$: BehaviorSubject<any>;
public movieStates = [{
name: 'Movie 1',
url: 'http://google.com'
}];
constructor() {
this.movieStore$ = new BehaviorSubject(this.movieStates);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment