Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 06:48
    iRealNirmal synchronize #42978
  • 06:39
    iRealNirmal synchronize #42978
  • 05:54
    Airblader commented #43003
  • 05:44
    xarfai edited #43007
  • 05:42
    xarfai opened #43007
  • 05:29
    jpduckwo commented #43003
  • 05:12
    jpduckwo commented #43003
  • 04:38
    Airblader commented #43003
  • 02:04
    stupidawesome opened #43006
  • 01:55
    Mohamad-Ilham-Ramadhan starred angular/angular
  • 01:52
    johnson-abraham starred angular/angular
  • 01:44
    TheManOfTeel starred angular/angular
  • Jul 31 22:13
    jpduckwo edited #43003
  • Jul 31 22:05
    dario-piotrowicz commented #42608
  • Jul 31 22:04
    dario-piotrowicz commented #42608
  • Jul 31 21:58
    dario-piotrowicz synchronize #42608
  • Jul 31 21:54
    jpduckwo commented #43003
  • Jul 31 21:49
    dario-piotrowicz review_requested #42608
  • Jul 31 21:49
    dario-piotrowicz review_requested #42608
  • Jul 31 21:48
    dario-piotrowicz synchronize #42608
Alexander Wieser
@crystalbyte
@justindujardin Thanks, however this does only solve the problem for a single method, I was hoping for a more generic way to access the root objects.
Perhaps it's just me, I come from the C++/C# land far far away, where the global scope has been banished from the lands :P
Justin DuJardin
@justindujardin
Updated material components, with better test coverage and a revamped example site making use of the new peekaboo component. https://justindujardin.github.io/ng2-material/
Rob Wormald
@robwormald
don't use the wrappers :) they're internal
hgrubst
@hgrubst
Hello, I'm trying to programatically access all the route definitions of my top level Router. Something similar to what $state.get() does in ui-router. Is there anyway this can be done ?
Alexander Wieser
@crystalbyte
Is there a way to trigger an http observable, such as http.get to fetch the data multiple times or do I need to create a new one each time and replace the old ?
Rob Wormald
@robwormald
you can just resubscribe to it
though it depends what you're looking to do - polling? or?
Alexander Wieser
@crystalbyte
@robwormald Lets just say I need to refresh the data coming from a get request. I was hoping to be able to call this.items.refresh() so the entire sequence is simply run again.
Rob Wormald
@robwormald
there's a couple of ways you could do it
Rob Wormald
@robwormald
Alexander Wieser
@crystalbyte

@robwormald I'd love to hear them ;) Perhaps you could explain to me if its possible to bind directly against a single Observable. When using the ngFor directive I can simply use the async pipe

<section *ngFor="#p of profiles | async"></section>

How do I do that directly without using *ngFor.

Rob Wormald
@robwormald
the same way - though typically i would have a profile component and do something like <profile [data]="profile | async">
Alexander Wieser
@crystalbyte
Isn't it overkill to create an entire component merely for fetching some json data?
Rob Wormald
@robwormald
not for fetching
for displaying
to encapsulate the profile or whatever
Alexander Wieser
@crystalbyte
@robwormald Thanks for the plunker, I am currently trying to understand how it works.
Rob Wormald
@robwormald
there's basically two sequences
the initial load
Alexander Wieser
@crystalbyte
@robwormald Ok, so we fetch the data into the [data] property from the Observable profiles, thanks.
Rob Wormald
@robwormald
and then another which is a sequence of clicks -> mapped to requests
and then they just get concatted together into a single sequence
Eric Martinez
@ericmartinezr
:point_up: 28 de Diciembre de 2015 12:06 @robwormald sorry for insisting, do you have any comments on that question?
Rob Wormald
@robwormald
didn't see that question
if its a single-value-sequence (like an http request) the manual cleanup is unnecessary (assuming you subscribe in the controller manually)
if its an infinite sequence, you should unsubscribe
which the async pipe does for you,
Eric Martinez
@ericmartinezr
got it, thanks :+1:
Rob Wormald
@robwormald
i should say "if its a sequence that completes"
(of which single value sequences, a la http, are one)
Alexander Wieser
@crystalbyte
@robwormald Are you sure that the http sequence completes ? I tried using .finally() on it and it was never invoked, it should, however, if complete is being called.
Or is complete called after ngOnDestroy ?
Brandon
@brandonroberts
@hgrubst there isn't a built-in way currently possible to get the route definitions once they are configured. Depending on what you need you can get some of that data from the instruction or route data if you need something custom.
Rob Wormald
@robwormald
yes, i'm sure :)
Zahadi Eslicho
@panKt

Once I do injector.get(RouteParams) it throws No provider for RouteParams!
Where shall I look?

P.S. here is bootstrap

  return bootstrap(App, [
    HTTP_PROVIDERS,
    ROUTER_PROVIDERS
  ])
Anthony
@qdouble
@robwormald I'm trying to see what would be the best way to incorporate google's recaptcha as no one has put out any code for it yet for Ang2, any recommendations on what would be the best way to approach?
Rob Wormald
@robwormald
how does it work?
@panKt you dont need to be using the injector
Anthony
@qdouble
@robwormald well this is how someone wrote the script for it to work on Ang 1, not sure if I would have to just try to rewrite it for Ang2 or look into using lifecycle hooks and elementref https://github.com/VividCortex/angular-recaptcha/tree/master/src
Zahadi Eslicho
@panKt
@robwormald actually I’m trying to write some code inside @CanActivate decorator. And in that code I need to refer to RouteParams
but because Component is not created on @CanActivate cycle, I need to inject it
hgrubst
@hgrubst
@brandonroberts Ok that's what I thought. The reason I want that is to do a wizard style form with multiple step. I like having the steps configured in one central place for which the router makes sense. The fact that you can add arbitrary data to routes makes this even more convenient. With this you can then write a breadcrumb component which renders the wizard steps to the user.
@brandonroberts I can hardcode the routes in my component for now. Would be a nice addition to the router I think though.
Zahadi Eslicho
@panKt
@robwormald That’s it, thanks :)
Rob Wormald
@robwormald
@qdouble looking at the docs, i'd probbaly just add a directive to the captcha element
Zahadi Eslicho
@panKt
@robwormald ok, I untimely said it is ok, check it out http://plnkr.co/edit/siMNH53PCuvUBRLk6suc?p=preview this one also says
No provider for RouteParams!
if you click on Protected Page link
Rob Wormald
@robwormald
i dunno that it'll work, to be honest.