Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Sekib Omazic
@SekibOmazic
Yes, there is an empty object (repoDetails = {};) but no elvis in the template. I get something like "No property name of undefined". Why that works in your case? First time the template gets rendered, it only hasrepoDetails = {};until real repoDetails arrives via subscribe, right?
Rob Wormald
@robwormald
typically that means you're using nested properties
like foo.bar.baz
again this depends if you're using async pipe or not
Louis
@Louis-7
@robwormald thx, I just thinking angular may give a solution. Anyway, thanks. :)
Aleš
@fxck
why are you not using it in that seed repo anyway @robwormald ?
Rob Wormald
@robwormald
mostly to not confuse the fuck out of everybody
Aleš
@fxck
lol
k
also the official heroexamplewhatever is using promises
Rob Wormald
@robwormald
that's a long story
Sekib Omazic
@SekibOmazic
Lesson learned: flatten your damn data structure.
Sekib Omazic
@SekibOmazic
@fxck Know that. Not using it (yet) ;-)
Aleš
@fxck
unless you have to work with some existing and unmodifiable apis, it'd be better to send the data already flat from the backend anyway..
Sekib Omazic
@SekibOmazic
Drawback of flatten backend - I need more backend calls. If I had Company->Departments -> Emplyees I'd need 3 API calls to build the tree
Rob Wormald
@robwormald
heh, i was just messing with a plunk dealing with this
not necessarily, if your backend is smart it can do sideloading
Aleš
@fxck
that's why I kind like what falcor is doing
Sekib Omazic
@SekibOmazic
@robwormald I'm all ears (eyes actually) Let me subscribe to your plunk ;-P
Aleš
@fxck
also redux + falcor seems to be(or will be.. should be.. whatever) working together
rackt/redux#560
Rob Wormald
@robwormald
i'd totally use normalizr but lodash deps ftl
Aleš
@fxck
yea
KenavR
@KenavR
Hi, when using inline (@component) styling is there a selector for the component? The tag name doesn't seem to work.
oh ok :host works
Rob Wormald
@robwormald
Sekib Omazic
@SekibOmazic
@robwormald Great. Thanks a lot.
Andy
@Kylia669
No provider for IterableDiffers! (NgFor -> IterableDiffers)
hey getting this issue when trying to *ngFor="#item of items"
items - simple array of objects
what is wrong?
Rob Wormald
@robwormald
is it actually an array of objects?
Abhilash
@abhibly
Hie...I'm trying create auxiliary routes in deep linked routes...but im am not getting it...I tried according to this video https://www.youtube.com/watch?v=z1NB-HG0ZH4 and didnt succeed...I have created a plunker demo...how to rectify the mistake? http://plnkr.co/edit/MVWG76rh7PDvzc3oMYgB?p=preview
Aleš
@fxck
what's that @robwormald ?
Sekib Omazic
@SekibOmazic
@fxck Answer to my questions (Observables, async pipe, template with async data,...) I'd say :-)
Aleš
@fxck
that object.assign syntax is hideous btw
Eric Martinez
@ericmartinezr
If I have a service which holds a http request to something, and I want to share its result across differents components without redoing the request, is ReplaySubject the best option? That's what I'm doing and it works perfectly, just want to be sure.
Sekib Omazic
@SekibOmazic
Well Immutable.jsisn't much prettier
@ericmartinezr I also use ReplaySubject(1) for that purpose
Eric Martinez
@ericmartinezr
Nice! I'm not the only crazy one! :P thx :D
Sekib Omazic
@SekibOmazic
You can try to decide upon http://www.introtorx.com/content/v1.0.10621.0/02_KeyTypes.html Couldn't see much difference to BehaviorSubject though
Eric Martinez
@ericmartinezr
Yup, probably BehaviorSubject would fit better since I'm passing one value, ReplaySubject can cache more than one. Thanks, I'll try that :+1:
There are so many options
Abhilash
@abhibly
Is it possible to use aux routes in a router-outlet?
JavascriptMick
@JavascriptMick
just for the dummies, does the Tour of Heroes tutorial finish at toh4? I found a toh5 but there are lots of errors in the snippets
Aleš
@fxck
I'd stay away from the tour of heroes..
it's like "look, http returns an observable, so the best thing you can do, obviously, is to wrap that in a promise, and manually handle resolve and reject"... I think it confuses people and gives them all the wrong ideas
JavascriptMick
@JavascriptMick
yea, i took the data handing with a grain of salt
pantonis
@pantonis
Im a newbie in angular2