Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Simplify routing configuration syntax #435

Closed
pavelgj opened this issue Jan 24, 2014 · 8 comments · Fixed by #525
Closed

Simplify routing configuration syntax #435

pavelgj opened this issue Jan 24, 2014 · 8 comments · Fixed by #525
Assignees
Milestone

Comments

@pavelgj
Copy link
Contributor

pavelgj commented Jan 24, 2014

Proposed syntax

configure(router, {
   'foo': ngRoute(
       path: '/foo',
       view: 'foo.html',
       mount: {
         'bar': ngRoute(
             path: '/bar',
             viewHtml: '<bar-component></bar-component>',
             defaultRoute: true
         ),
         'baz': ngRoute(
             path: '/:baz'
         )
       }
   ),
   'qux': ngRoute(
       path: '/qux',
       view: 'qux.html'
   )
 });
@bgourlie
Copy link
Contributor

It would be really useful if NgRoute had a "check" parameter (or some more appropriate name) that takes either a bool or a Future, and will prevent the route from changing if false is passed or returned by the future. I have a bug out on the route repo that is related: justinfagnani/route#60.

@sethladd
Copy link
Contributor

/sub

@pavelgj
Copy link
Contributor Author

pavelgj commented Jan 25, 2014

@bgourlie
It's outside the scope of configuration DSL in angular. justinfagnani/route#60 is right issue to track this.

@sethladd
Copy link
Contributor

Looking forward to trying this.

@pavelgj
Copy link
Contributor Author

pavelgj commented Feb 7, 2014

Closed via 3db9ddd

@sethladd
Copy link
Contributor

sethladd commented Feb 8, 2014

Does viewHtml work?

@pavelgj
Copy link
Contributor Author

pavelgj commented Feb 9, 2014

No. Track #425 for viewHtml

@sethladd
Copy link
Contributor

Thanks. #425 works for me.

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

Successfully merging a pull request may close this issue.

3 participants