Routing Namespaces
addNamespace( pattern="/testing", namespace="test" );
route( "/testing" ).toNamespaceRouting( "test" );
addNamespace( pattern="/news", namespace="blog" );
route( "/news" ).toNamespaceRouting( "blog" );// Via Grouping
route( "/news" ).toNamespaceRouting( "blog" )
.group( { namespace = "blog" }, function(){
route( "/", "blog.index" )
.route( "/:year-numeric?/:month-numeric?/:day-numeric?", "blog.archives" );
} );
// Via Routing DSL
addNamespace( "/news", "blog" );
route( "/" )
.withNameSpace( "blog" )
.to( "blog.index" );
route( "/:year-numeric?/:month-numeric?/:day-numeric?" )
.withNameSpace( "blog" )
.to( "blog.archives" );
Was this helpful?