Skip to content

How to use operator ? #1

@ball6847

Description

@ball6847

I've tried rx-simple-store with angular4 and it work very well, except one thing, I cannot get rxjs operators to work with the store class.

import { Component } from '@angular/core'
import { AppStore } from './store'
import 'rxjs/add/operator/map'

@Component({
  selector: 'app',
  template: 'app component',
})
export class AppComponent {
  constructor(private store: AppStore) {
    this.store
      .map(x => x.item)
      .subscribe(x => {
        console.log(x)
      })
  }
}

this will raise an error:

Property 'map' does not exist on type 'AppStore'

The installed version is ^0.3.0

Please advice,
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions