The problem
I have an large non-angular site with an URL structure like so:
The non-angular site uses the hash part of the URL for it's own state.
In this site I am trying to use Angular 1.0.7 for some small widgets - a perfect match, right? :)
The problem is that when I start my widget (Angular App) it changes my URL and thus the state of the non-angular site.
It adds a forward slash to the hash part of the url, like so:
By doing that, the state of the non-angular site is destroyed causing all kinds of errors.
Any ideas on how to force AngularJS to keep it's hands off my hash? ;)
The setup
The site have loaded a javascript file that defines my App. Along these lines:
var App = angular.module("MyApp", []).controller("MyCtrl", function() { ... });
Then I create a dom element along these lines:
var el = document.createElement("DIV");
el.setAttribute("ng-controller", "MyCtrl");
el.setAttribute("ng-include", "'/path/to/my/template'");
document.appendChild(el);
angular.bootstrap(el, ["MyApp"]);