First things first, I want to adjust the pattern that Angular uses to match against for URL routing. I have found the function and it is running the url location against these regex(s) found on ln 5612 of angular.js (version http://code.angularjs.org/1.1.5/):
SERVER_MATCH = /^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,
PATH_MATCH = /^([^\?#]*)(\?([^#]*))?(#(.*))?$/,
DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};So why would I want to do that? I am using angular as the framework for a desktop AIR application. AIR applications can be built using HTML/JS, which is subsequently wrapped in AIR which provides access to the filesystem and OS. So this combination essentially allows you to build a multi-platform desktop web application with angular. Powerful stuff.
Here is the problem AIR has a custom address bar string which looks like 'app:/' rather than 'http://'. So it has 1 slash instead of two. Angular uses the the address bar location to route the application, i.e.http://something.com/#/contactList means load the contactList view and its associated controller. My knowledge of Regex is pretty (very) limited so I can't read the patterns I included above, but I am guessing that the 1 slash instead of 2 or something similar to that could be the problem.
My aim is to adjust the patterns so that 'app:/' would be a valid pattern and my hope is that the URI segment making and associated actions would still work.
(I am using ui-router by the way but I am not sure that this is a specific to ui-router question)(Also I am very new to angular so I apologize for a naiveté)
Thanks,
Scott