There are numerous resources out there for implementing SEO-friendly versions of AngularJS applications, of course. Despite reading all of them numerous times, I'm still a bit unclear on a few things, particularly regarding the distinction between the hashbang and HTML5 mode models:
For hashbang (
#!, or "HTML4") apps, the following setting is given on thelocationprovider:$location.hashPrefix('!');Is this setting required for HTML5 mode as well? Why or why not?
For HTML5 mode apps, the following
metatag is included in theindex.htmlpage:<meta name="fragment" content="!">Is this meta tag required for hashbang apps as well? Why or why not?
Using HTML5 mode, my URLs look similar to:
http://sample.com/landing/homeEven with the
metatag from #2 specified in myindex.html, I'm still unable to navigate to my URLs as a crawler would, such as to:http://sample.com/#!/landing/homeIs this normal? Should I expect to be able to navigate to my app hashbang-style, if it's an HTML5 mode app, after adding the
locationprovider settings and/ormetatag?
More than anything, I guess my actual question would be: what's specifically required for HTML5 mode crawling, and what's specifically required for hashbang-style crawling? How do they overlap? Additionally, how does the HTML5 mode configuration actually work, behind the scenes, if no hashbang-style route is ever produced/usable?
Note that these questions are separate from the issue of generating/serving snapshots, which I generally understand.
AngularJS SEO-friendly configuration generally makes sense when it comes to classical hashbang-style apps, but for HTML5 mode, I'm a bit confused. Would love some clarity.