Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:12

    copybara-service[bot] on g3

    refactor(animations): change er… refactor(forms): Make a couple … refactor(core): make the error … and 2 more (compare)

  • 18:06
    dereklin edited #44756
  • 18:06
    Lukzat starred angular/angular
  • 17:58
    dylhunn closed #44712
  • 17:58

    dylhunn on master

    feat(compiler-cli): enable exte… (compare)

  • 17:58
    dylhunn commented #44712
  • 17:57
    dgp1130 labeled #44712
  • 17:55
    josephperrott review_request_removed #44712
  • 17:42
    dylhunn closed #44749
  • 17:42

    dylhunn on master

    docs: deprecate `ComponentFacto… docs: deprecate `CachedResource… docs: deprecate unused config o… (compare)

  • 17:42
    dylhunn commented #44749
  • 17:41
    AndrewKushnir labeled #44749
  • 17:41
    AndrewKushnir unlabeled #44749
  • 17:41
    AndrewKushnir review_request_removed #44749
  • 17:41
    AndrewKushnir review_request_removed #44749
  • 17:41
    dylhunn closed #44758
  • 17:41

    dylhunn on master

    docs: release notes for the v13… (compare)

  • 17:40
    dylhunn commented #44758
  • 17:39
    dylhunn labeled #44758
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
any tutorial on asp.net and angular2?
Aleš
@fxck
if you are a newbie, then learn angular2 basics first
what backend you use after that is entirely up to you
Rob Wormald
@robwormald
@fxck ""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"
where is that happening?
Aleš
@fxck
I'm probably exaggerating, but there is something similar happening, let me find it..
dunno, either can't find it(wrapping http in a promise), or it was changed already, http://stackoverflow.com/questions/34455531/angular-2-object-works-object-child-throws-error?noredirect=1#comment56653446_34455531 here's the confusion though

that guy is doing this

  getProfileData(username:string):any {
    return new Promise((resolve, reject) => {
      this._authHttp.get(API_PREFIX + '/users/username/' + username)
        .map(res => res.json())
        .subscribe(
          data => {
            resolve(data.data);
          },
          err => {
            reject(err);
          }
        )
      ;
    });

simple because he saw promises being used in the tutorial

Vlado Tesanovic
@vladotesanovic
What is the best way to detect when @Input('something') get value?
JavascriptMick
@JavascriptMick
I thought the tutorial was decent in general though and the carry on sections for dependency injection and user input were also good
Aliaksandr Astashenkau
@dfsq
@fxck so you mean it is better to return observable anyway instead of promise object?
Aleš
@fxck
this would be the way to do it
  getProfileData(username:string):any {
      this._authHttp.get(API_PREFIX + '/users/username/' + username).map(res => res.json());
  };
don't need anything else
Aliaksandr Astashenkau
@dfsq
this will return observable. but if someone wants a promise
Aleš
@fxck
the question is
why would anyone want a promise?
but if you really really wanted a promise, you could probably just do Observable.toPromise()
(not sure if that's ported to rxjs5)
Aliaksandr Astashenkau
@dfsq
well, I guess many people (including me) a little confused with new approaches with observables, so I can understand that someone would want to continue to consume good old promises
Aleš
@fxck
believe me, you don't.. the only difference between a promise and an observable, when it comes to a simple Http request
is that you do .subscribe() instead of .then()
Soroush Gholamzadeh
@s-o-r-o-u-s-h
@dfsq I also should say that Observables have very useful methods that implementing them with a promise would be a hard task, like retry()
Aliaksandr Astashenkau
@dfsq
i know all that, just saying that some people are going to be confused anyway