I can't seem to wrap my head around a routing setup for a project I'm 
working on at the moment. I tried ngRoute, angular-sement-router, now 
trying ui-router, however I'm still struggling to understand how to use 
them in my scenario. I've attached an image to illustrate the kind of a 
thing I want to achieve. Basically, I need to have two types of pages — one 
type is a multi-section scrolling page. Another one is just a plain page 
with text and images. The multi-section one should scroll to a certain 
section according to a current route. Each section has a set of 
subsections. So the route like #!/section-2/subsection-2 should make the 
app scroll to Section-2 (smooth scrolling is not an issue at the moment) 
and activate Subsection 2.

I tried using named ui-views, but then I have to have an initial state of 
each named ui-view on my route state. It leads to another problem. If let's 
say I would navigate to #!/section-1/subsection-1 my Section 1 subsection 
will return to whatever is set in the initial state. Another issue is that 
my setup should separate Sections 1-4 from Section 5 which is a separate 
page. I hope my description makes sense. Would love to here any advice on 
what I can read or where can I find some useful ideas. Thanks in advance.

<https://lh3.googleusercontent.com/-N-pqzd24GUI/U6qnK7Y9bOI/AAAAAAAAAnA/bPm-QQX22-8/s1600/sections-01.png>


-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to