0

I have a page "detail.html", which is for displaying blog detail. Same page "detail.html" dynamically fetch blog detail for all users and their blogs. Page "detail.html" has blog title, images and description. I want to use blog title in my URL. I want this to boost my page SEO. is there any way to achieve this in angular routing.

For example-
www.domain.com/wonderfull-outing-with-friends
www.domain.com/when-i-found-the-truth
these two blogs displaying on same page -detail.html
Puigcerber
  • 9,814
  • 6
  • 40
  • 51
Raj Rj
  • 3,497
  • 4
  • 24
  • 34

1 Answers1

0

you can do it by using route parameter.

app.config(['$routeProvider', function($routeProvider) {
    $routeProvider
             .when('/admin', {templateUrl: 'admin.html', controller: 'AdminCtrl'})
             .when('/admin/:type', {templateUrl: 'admin.html', controller: 'AdminCtrl'})
             .when('/admin/:type/:id', {templateUrl: 'admin.html', controller: 'AdminCtrl'}); }]);
Raj Rj
  • 3,497
  • 4
  • 24
  • 34