Skip to content

Change Quick Start Example to Use Nested Views #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
timkindberg opened this issue Jun 14, 2013 · 4 comments
Closed

Change Quick Start Example to Use Nested Views #183

timkindberg opened this issue Jun 14, 2013 · 4 comments
Assignees
Labels

Comments

@timkindberg
Copy link
Contributor

@ksperling said in #174 (comment):

There's an anti-pattern I've seen in a few questions where people define a bunch of ui-views in their top level HTML file... ...I wonder if this approach is based on the fact that in $route nesting of routes just didn't make sense, whereas it is somewhat easier to understand how it would have generalized to multiple (non-nested) named views.

I agree. So a problem with the current quick start is that it shows off multiple views which are actually much less useful than nested views. This leads users to think that multiple views are the most important concept. So I think we could revamp quick start to show nested views.

@ghost ghost assigned timkindberg Jun 14, 2013
@mickhansen
Copy link

Any update to this? I'm having issues figuring out how to properly nest views.
Are there any non-official examples one can look at?

@ksperling
Copy link
Contributor

@mickhansen You can look at the sample app, it primarily uses nested views.

@mickhansen
Copy link

@ksperling Yes i saw :) However it uses just one child per parent.

Is there anywhere to do a layout like:

content
    left-side
    right-side 
queue

For example? I'd like to be able to define say queue, because it's in most layouts, but not all.
I tried fiddling around with named views but i couldn't quite get it to work.

I was trying to define a base state that implemented the skeleton layout, but i couldn't quite get the child states to plug into the right slots.

@timkindberg
Copy link
Contributor Author

I updated the quick start. I'm really hoping the halts the popularity of the multi-named views anti-pattern we've been seeing so much of. Sometimes it seems as though devs start using ui-router without really even knowing the problems it was created to solve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants