mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
Angular should look for angular-ie-compat file at the right location
The location should be based on the base path of the angular script
and the version identifier of the angular script.
ex: angular.js -> angular-ie-compat.js
js/angular-0.9.0.min.js -> js/angular-ie-compat-0.9.0.js
This commit is contained in:
@@ -49,7 +49,7 @@ var _undefined = undefined,
|
||||
angularService = extensionMap(angular, 'service'),
|
||||
angularCallbacks = extensionMap(angular, 'callbacks'),
|
||||
nodeName,
|
||||
rngScript = /^(|.*\/)angular(-.*)?(\.min)?.js(\?[^#]*)?(#(.*))?$/;
|
||||
rngScript = /^(|.*\/)angular(-.*?)?(\.min)?.js(\?[^#]*)?(#(.*))?$/;
|
||||
|
||||
function foreach(obj, iterator, context) {
|
||||
var key;
|
||||
@@ -426,14 +426,13 @@ function angularJsConfig(document, config) {
|
||||
var scripts = document.getElementsByTagName("script"),
|
||||
match;
|
||||
config = extend({
|
||||
base_url: '',
|
||||
ie_compat: 'angular-ie-compat.js',
|
||||
ie_compat_id: 'ng-ie-compat'
|
||||
}, config);
|
||||
for(var j = 0; j < scripts.length; j++) {
|
||||
match = (scripts[j].src || "").match(rngScript);
|
||||
if (match) {
|
||||
config.base_url = match[1];
|
||||
config.ie_compat = match[1] + 'angular-ie-compat' + (match[2] || '') + '.js';
|
||||
extend(config, parseKeyValue(match[6]));
|
||||
eachAttribute(jqLite(scripts[j]), function(value, name){
|
||||
if (/^ng:/.exec(name)) {
|
||||
|
||||
Reference in New Issue
Block a user