title: rxjs pass parameter in Subject.next
body: <p>I'm new to rxjs, I'm trying to pass parameter in <code>Subject.next(args)</code> I have the following class:</p>
  
  <pre><code>@Injectable()
  export class ListPosts {
  baseURL: string = 'http://localhost/wptest/api';
  _load = new Subject();
  
  constructor(private http: Http) {
      var currentPage = this._load
          .scan((currentPage) =&gt; currentPage + 1, 0)
  
      var postResponses = currentPage           //args here is undefined
          .flatMap(args =&gt; this.fetchPosts(args))
          .share();
  
      var loadedPosts = postResponses
          .map(json =&gt; json.posts)
          .scan((allPosts, newPosts) =&gt; allPosts.concat(newPosts), []);
  
      this.loadedPostCount = loadedPosts.map(p =&gt; p.length);
      this.totalPostCount = postResponses.map(json =&gt; json.count_total);
  
      this.completed = Observable.combineLatest(this.loadedPostCount, this.totalPostCount, (loaded, total) =&gt; loaded &gt;= total);
  
      this.posts = loadedPosts;
  }
  
  fetchPosts(args: any) {
      console.log("count: " + args[0] + " page :" + args[1] + " type: "+ args[2]);
  }
  
  loadMore(args: any) {
      this._load.next(args);
  }
  }
  </code></pre>
  
  <p>but if I change <code>currentPage</code> to <code>this._load</code>, it works</p>
  
  <pre><code>var postResponses = this._load
          .flatMap(args =&gt; this.fetchPosts(args)) //args here is defined
          .share();
  </code></pre>
  
  <p>I need to get the args through <code>currentPage</code>, how can I fix it?</p>