3

We are working on website where we using AngularJs. Is there any way to make AngularJs user-friendly urls and seo-friendly urls

Want

application/#user/add

to

application/User/Add

In AngularJs.


HTML 5 mode convert hash based urls into Query string based url.

like

enter image description here

Hashbang URL - http://foo.com/#!/bar?baz=23#baz

HTML 5 Mode - http://foo.com/bar?baz=23#baz

But I want make my url like this

http://foo.com/bar/baz/23/baz (Fully SEO Friendly url)

virender
  • 4,539
  • 5
  • 27
  • 31

2 Answers2

0

The default mode is called the Hashbang mode, which has the # you do not want. You can enable HTML5 mode with $locationProvider.html5Mode(true);

Read more about setting up routing in HTML5 mode here: https://docs.angularjs.org/guide/$location https://docs.angularjs.org/api/ng/provider/$locationProvider

bakkal
  • 54,350
  • 12
  • 131
  • 107
0

The best solution as far as I am looking for my angularJS website is is AngularJS SEO PreRender: Node server that uses phantomJS to render a javascript-rendered page as HTML. To be used in conjunction with prerender middleware.

https://github.com/prerender/prerender

Ebrahim
  • 1,740
  • 2
  • 25
  • 31