Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit b798ee8

Browse files
alkismhevery
authored andcommitted
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.
1 parent 21e78c4 commit b798ee8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Angular.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ function angularInit(config){
385385
}
386386

387387
function angularJsConfig(document, config) {
388-
var filename = /^(.*)\/angular(-([^\/]*))?.js(#(.*))?$/,
388+
var filename = /^(.*)\/angular(-([^\/]*))?.js(\?[^#]*)?(#(.*))?$/,
389389
scripts = document.getElementsByTagName("script"),
390390
match;
391391
config = extend({
@@ -396,7 +396,7 @@ function angularJsConfig(document, config) {
396396
match = (scripts[j].src || "").match(filename);
397397
if (match) {
398398
config.base_url = match[1] + '/';
399-
extend(config, parseKeyValue(match[5]));
399+
extend(config, parseKeyValue(match[6]));
400400
eachAttribute(jqLite(scripts[j]), function(value, name){
401401
if (/^ng:/.exec(name)) {
402402
name = name.substring(3).replace(/-/g, '_');

0 commit comments

Comments
 (0)