Skip to content

can't use the uid in my URL for SEO #6

@heshamelmasry77

Description

@heshamelmasry77

Hey thank you for sharing this repo it is very helpful.
I am facing a big huge problem to get my URLS to be seo friendly.

at the controller here we are using the id to get the document but i don't want to use it.

I want to use the uid for example it doesn't work.

that what we have :
$routeProvider.when('/document/:id/:slug', {templateUrl: 'partials/document.html', controller: 'DocumentCtrl'});

i wanna use this :
$routeProvider.when('/document/:uid/:slug', {templateUrl: 'partials/document.html', controller: 'DocumentCtrl'});

and when i redirect i wanna use this :

<a ng-href="#/document/{{document.uid}}/{{document.slug}}">
           {{document.slug}}
       </a>

i want my link to be something like this :
http://127.0.0.1:52486/app/index.html#/document/make/tata
make is a type in my prismic repo i made it whatever i want anything else from the fragment object not the id
i tried many things but it nothing worked with me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions