Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 07:54
    alan-agius4 edited #42765
  • 07:43
    crisbeto commented #46868
  • 07:35
    crisbeto synchronize #46868
  • 07:34
    crisbeto synchronize #46868
  • 07:14
    imlhx starred angular/angular
  • 06:48
    dylhunn synchronize #47088
  • 06:42
    jogelin opened #47089
  • 06:30
    Harpush commented #46815
  • 06:28
    dylhunn synchronize #47088
  • 06:24
    JoostK commented #47086
  • 06:23
    dylhunn synchronize #47088
  • 06:23
    dylhunn synchronize #47088
  • 06:17
    ngbot[bot] milestoned #47088
  • 06:17
    ngbot[bot] milestoned #47088
  • 06:17
    dylhunn labeled #47088
  • 06:17
    dylhunn labeled #47088
  • 06:17
    dylhunn labeled #47088
  • 06:17
    dylhunn opened #47088
  • 06:04
    K-Vishwak commented #47086
  • 06:03
    K-Vishwak commented #47086
Rob Wormald
@robwormald
its like peering into the guts of a promise. not kosher.
Vlado Tesanovic
@vladotesanovic
I also tried to implement custom directive on it, but it seems that does not work.
Sekib Omazic
@SekibOmazic
Is this the "right" way to handle Observables (return Observable from the service and use async pipe in the template)? @robwormald
Aleš
@fxck
yes
there are very few or no cases at all where you'd want to handle observables manually instead of using the async pipe
Rob Wormald
@robwormald
yep. although really, you've already got the subject available on the service
this.friends = friendsService.friends
Sekib Omazic
@SekibOmazic
In my app (which is too big for plunker) I read friends from backend and ngFor them in a list like this: *ngFor="#friend of firends | async" [routerLink]="['./Friend', {'id': friend.id}]"
But in the Friend component I need an empty Friend object in order to render the template for the first time (until Friend Object arrives). How do you deal with it?
Aleš
@fxck
with elvis most likely
(friend | async )?.name
Louis
@Louis-7
um... anyone know something about my question?
Sekib Omazic
@SekibOmazic
yes but he's not using async pipe at all, he's handling it manually in the component
@Louis-7 the short answer is no, the DOM is what the DOM is. there's no way to get any version other than how it exists at the current time
the longer answer is you're probably thinking about this incorrectly, imho, so perhaps make a plunker to demonstrate what you're trying to do
basically the entire point of Angular (and React, for that matter) is to avoid touching the DOM
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?