Angular2 router (rc3)



  • The problem of the new router is, if the page is tall (e.g. auction) and we move it, it won't cross it (even if the parameters change).

    If there's a page like auction/:auction_id And we're going to be like,

    this.router.navigate(['/auction', { auction_id: id });
    

    That's the first time we'll be able to get to the right page. And then we're trying to cross the other page (id the other) but the page remains old and nothing. You can see:

    navigationStart, url=/auction;auction_id=470
    navigationRecognized, url=/auction;auction_id=470
    navigationEnd, url=/auction;auction_id=470
    

    (the first time auction_id was, for example, 400). And even though the events of navagationStart-Recognized-End happen, the page is missing. What do you have to do to get the page anyway? I understand how the page /auction was that she stayed. However, the parameter has changed.



  • The new versions of Angular are not available for the same component with other OnInit parameters (only constructor). Therefore, in order to change the page, it is necessary to simply change the necessary data in the component design.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2