aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlkis Evlogimenos2010-09-16 01:19:11 +0800
committerMisko Hevery2010-09-16 00:22:55 +0200
commitb798ee80c29d877aa8c9934382a140a080fa13bc (patch)
treed464e92bb4ab64e9b437da908d7c8bb898854c1d /src
parent21e78c443fc5ced77f1ae7e3fc1647f7d9a22115 (diff)
downloadangular.js-b798ee80c29d877aa8c9934382a140a080fa13bc.tar.bz2
Allow angular to be included with query parameters. This is a common
pattern for forcing a reload of the script in the browser irrespective of the cache settings the host has.
Diffstat (limited to 'src')
-rw-r--r--src/Angular.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 1c75a063..7ea43c98 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -385,7 +385,7 @@ function angularInit(config){
}
function angularJsConfig(document, config) {
- var filename = /^(.*)\/angular(-([^\/]*))?.js(#(.*))?$/,
+ var filename = /^(.*)\/angular(-([^\/]*))?.js(\?[^#]*)?(#(.*))?$/,
scripts = document.getElementsByTagName("script"),
match;
config = extend({
@@ -396,7 +396,7 @@ function angularJsConfig(document, config) {
match = (scripts[j].src || "").match(filename);
if (match) {
config.base_url = match[1] + '/';
- extend(config, parseKeyValue(match[5]));
+ extend(config, parseKeyValue(match[6]));
eachAttribute(jqLite(scripts[j]), function(value, name){
if (/^ng:/.exec(name)) {
name = name.substring(3).replace(/-/g, '_');