<div dir="ltr">The <base> tag addition has had to be reverted as it broke other parts of the application (notably lazy loaded tabs like Instance Details), sadly.<div><br></div><div>Regarding which router to use - I've used the built-in router in the past quite successfully. I think I'd want to see a solid reason for using a 3rd party one. It could be that nested routes are part of that, but I kinda see that as a convenience thing, unless I'm missing something core to how routing is planned to be done. Then again we really haven't had any discussion about how we see routing work. The one patch that's up that uses routing seems perfectly able to do so without needing extended capabilities of 3rd party routers.</div><div><br></div><div><br></div><div>     Richard</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 January 2016 at 09:44, Tripp, Travis S <span dir="ltr"><<a href="mailto:travis.tripp@hpe.com" target="_blank">travis.tripp@hpe.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Rajat,<br>
<br>
Thanks for starting some discussion here.  I think your target=“_self” is taken care of now, right?<br>
<br>
Re: ng-route vs ui-router - everything I have ever seen or been told supports using ui-router instead of ng-route.  I know a quick google search supports that, but let me google that for all of us and give several references:<br>
<br>
<a href="http://www.funnyant.com/angularjs-ui-router/" rel="noreferrer" target="_blank">http://www.funnyant.com/angularjs-ui-router/</a><br>
<a href="http://www.amasik.com/angularjs-ngroute-vs-ui-router/" rel="noreferrer" target="_blank">http://www.amasik.com/angularjs-ngroute-vs-ui-router/</a><br>
<a href="http://stackoverflow.com/questions/21023763/angularjs-difference-between-angular-route-and-angular-ui-router" rel="noreferrer" target="_blank">http://stackoverflow.com/questions/21023763/angularjs-difference-between-angular-route-and-angular-ui-router</a><br>
<a href="http://www.pearpages.com/javascript/angularjs/routing/2015/10/13/ngroute-vs-ui-router.html" rel="noreferrer" target="_blank">http://www.pearpages.com/javascript/angularjs/routing/2015/10/13/ngroute-vs-ui-router.html</a><br>
<a href="http://stackoverflow.com/questions/32523512/ui-router-vs-ngroute-for-sinlge-page-app" rel="noreferrer" target="_blank">http://stackoverflow.com/questions/32523512/ui-router-vs-ngroute-for-sinlge-page-app</a><br>
<br>
So, I’m wondering if there’d been any discussion I missed on why not bring in ui-router?<br>
<br>
Of course there is question using the new router in angular vs ui-router, but finding many pros- cons- on that seems to be a bit more difficult. Since it is 1.5 / 2.0 and neither are past rc / beta, it doesn’t seem like something we can debate too well.<br>
<br>
<a href="https://angular.github.io/router/getting-started" rel="noreferrer" target="_blank">https://angular.github.io/router/getting-started</a><br>
<a href="http://www.angulardaily.com/2015/12/angularintroduction-to-ngnewrouter-vs.html" rel="noreferrer" target="_blank">http://www.angulardaily.com/2015/12/angularintroduction-to-ngnewrouter-vs.html</a><br>
<br>
Thanks,<br>
Travis<br>
<br>
From: Rajat Vig <<a href="mailto:rajatv@thoughtworks.com">rajatv@thoughtworks.com</a><mailto:<a href="mailto:rajatv@thoughtworks.com">rajatv@thoughtworks.com</a>>><br>
Reply-To: OpenStack List <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a><mailto:<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>>><br>
Date: Thursday, January 7, 2016 at 1:53 AM<br>
To: OpenStack List <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a><mailto:<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>>><br>
Subject: [openstack-dev] [Horizon] Routing in Horizon<br>
<div><div class="h5"><br>
Hi Everyone<br>
<br>
One of my recent patches which enabled HTML5 based routing via Angular merged, some interesting things spun out.<br>
I'd to scramble a few patches to get things<br>
​​ back the same way<br>
for all new Angular Panels.<br>
<br>
I also realized that getting Horizon to an SPA with Angular requires more thought than mere fixing the current burning issue.<br>
This mail's intent is to spur a direction on how we do routing in Angular and how do Angular Panels go back/forth between themselves and older Django panels.<br>
<br>
The patch <a href="https://review.openstack.org/#/c/173885/" rel="noreferrer" target="_blank">https://review.openstack.org/#/c/173885/</a> is possibly the first of many to use Angular based routing.<br>
It currently uses ngRoute as the library was included in the xstatic-angular package.<br>
<br>
What I'm roughly thinking to solve some of the immediate issues (there's possbily much more that I'm not)<br>
<br>
1. If we are going to go with the SPA route, then all Panels need to indicate that they are Angular based.<br>
For panels that are Angular, they need to declare routes they'd like to manage.<br>
<br>
2. All tags on Angular Panels (including header, sidebar, footer) which don't route to Angular Panels will need the attribute target="_self" else Angular will not allow navigation to those links.<br>
<br>
All sidebar links currently have the attribute set but headers and footers don't.<br>
Sidebar links for Angular shouldn't have the attribute else SPA like behavior will not happen.<br>
This will need to be documen<br>
​tation​<br>
​<br>
​<br>
​<br>
.<br>
<br>
3. That implies yet another problem with the Spinner Modal which gets activated on all sidebar clicks.<br>
It'll need to be done differently for Angular routing vs hrefs still with Django.<br>
The current spinner relies on a browser page refresh to disappear.<br>
<br>
Then there's ngRoute.<br>
Routing needs in Angular may need to handle route conflicts and maybe nested routes.<br>
There are other, possibly better options that we could consider<br>
1. <a href="https://github.com/angular-ui/ui-router" rel="noreferrer" target="_blank">https://github.com/angular-ui/ui-router</a><br>
2. <a href="https://angular.github.io/router/" rel="noreferrer" target="_blank">https://angular.github.io/router/</a><br>
<br>
I've been part of the community for not long enough yet and I'm not yet completely aware of what exists outside the Horizon codebase so I might be missing somethings as well.<br>
<br>
Regards<br>
Rajat<br>
</div></div>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br></div>