I have an angularJS application where the route can be one of the below
www.website.com/blog/xyz
www.website.com/blog/xyz/title/other-params
In last url, title parameter is use for user readability sake, so it's not compulsory in the url. Hence I am using below angularJS code for my route.
$routeProvider
    .when('/blog', {
        templateUrl : url,
        controller : 'blogsHome'
    })
    .when('/blog/:blog_id', {
        templateUrl : url,
        controller : 'blogInfo'
    })
    .when('/blog/:blog_id/:url_params*', {
        templateUrl : url,
        controller : 'blogInfo'
    });
Now, in above code, I had to add middle when because angular expect :url_params and can not be empty. Is there any way I can omit middle when statement?
 
     
    