I have a source module:
import _ from 'underscore'
import {Observable} from 'rxjs'
export default function (rxfb) {
return {
getProperties () {
return rxfb.sources.user.getUser()
.switchMap(({properties}) =>
properties
? Observable.combineLatest(_(properties).map((property, propertyId) =>
this.getProperty(propertyId).map(property => ({propertyId, ...property}))))
: Observable.from([{}]))
}
}
}
I need to access it from another section so I am importing it:
import myProperties from '../../sources/properties'
Then I try:
console.log(myProperties.getProperties())
but it does not work, what is the proper way to get access to this method?