Angular 角度,在旧浏览器和移动浏览器中出现错误?

Angular 角度,在旧浏览器和移动浏览器中出现错误?,angular,Angular,为什么会出现以下错误: (SystemJS) missing ; before statement Zone$1</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost/node_modules/zone.js/dist/zone.js:365:17 Zone$1</Zone</Zone.prototype.run@http://localhost/node_modules/zone.js/dist/zo

为什么会出现以下错误:

(SystemJS) missing ; before statement
Zone$1</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost/node_modules/zone.js/dist/zone.js:365:17
Zone$1</Zone</Zone.prototype.run@http://localhost/node_modules/zone.js/dist/zone.js:125:24
scheduleResolveOrReject/<@http://localhost/node_modules/zone.js/dist/zone.js:760:52
Zone$1</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost/node_modules/zone.js/dist/zone.js:398:17
Zone$1</Zone</Zone.prototype.runTask@http://localhost/node_modules/zone.js/dist/zone.js:165:28
drainMicroTaskQueue@http://localhost/node_modules/zone.js/dist/zone.js:593:25
ZoneTask/this.invoke@http://localhost/node_modules/zone.js/dist/zone.js:464:25

Evaluating http://localhost/systemjs-angular-loader.js
Error loading http://localhost/systemjs-angular-loader.js
Error loading http://localhost/app/app.module.js as "./app/app.module" from http://localhost/main.js
还尝试使用es6 shim、es6 promise进行编译

systemjs.config.js

(function (global) {
System.config({
paths: {
  // paths serve as alias
  'npm:': 'node_modules/'
},
// map tells the System loader where to look for things
map: {
  // our app is within the app folder
  'app': 'app',

  // angular bundles
  '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
  '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
  '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
  '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platf$
  '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynam$
  '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
  '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
  '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',

  // other libraries
  'rxjs':                      'npm:rxjs',
  'underscore': 'npm:underscore/underscore.js',
  'socket.io-client': 'node_modules/socket.io-client/dist/socket.io.js',
  'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-me$
},
// packages tells the System loader how to load when no filename and/or no $
packages: {
  app: {
    defaultExtension: 'js',
    meta: {
      './*.js': {
        loader: 'systemjs-angular-loader.js'
      }
    }
  },
  rxjs: {
    defaultExtension: 'js'
  },
  "socket.io-client": {
    "defaultExtension": "js"
  }
}
});
})(this);
systemjs-angular-loader.js

var templateUrlRegex = /templateUrl\s*:(\s*['"`](.*?)['"`]\s*)/gm;
var stylesRegex = /styleUrls *:(\s*\[[^\]]*?\])/g;
var stringRegex = /(['`"])((?:[^\\]\\\1|.)*?)\1/g;

module.exports.translate = function(load){
var url = document.createElement('a');
url.href = load.address;

var basePathParts = url.pathname.split('/');

basePathParts.pop();
var basePath = basePathParts.join('/');

var baseHref = document.createElement('a');
baseHref.href = this.baseURL;
baseHref = baseHref.pathname;

basePath = basePath.replace(baseHref, '');

load.source = load.source
.replace(templateUrlRegex, function(match, quote, url){
  let resolvedUrl = url;

  if (url.startsWith('.')) {
    resolvedUrl = basePath + url.substr(1);
  }

  return 'templateUrl: "' + resolvedUrl + '"';
})
.replace(stylesRegex, function(match, relativeUrls) {
  var urls = [];

  while ((match = stringRegex.exec(relativeUrls)) !== null) {
    if (match[2].startsWith('.')) {
      urls.push('"' + basePath + match[2].substr(1) + '"');
    } else {
      urls.push('"' + match[2] + '"');
    }
  }

  return "styleUrls: [" + urls.join(', ') + "]";
});

return load;
};
var templateUrlRegex = /templateUrl\s*:(\s*['"`](.*?)['"`]\s*)/gm;
var stylesRegex = /styleUrls *:(\s*\[[^\]]*?\])/g;
var stringRegex = /(['`"])((?:[^\\]\\\1|.)*?)\1/g;

module.exports.translate = function(load){
var url = document.createElement('a');
url.href = load.address;

var basePathParts = url.pathname.split('/');

basePathParts.pop();
var basePath = basePathParts.join('/');

var baseHref = document.createElement('a');
baseHref.href = this.baseURL;
baseHref = baseHref.pathname;

basePath = basePath.replace(baseHref, '');

load.source = load.source
.replace(templateUrlRegex, function(match, quote, url){
  let resolvedUrl = url;

  if (url.startsWith('.')) {
    resolvedUrl = basePath + url.substr(1);
  }

  return 'templateUrl: "' + resolvedUrl + '"';
})
.replace(stylesRegex, function(match, relativeUrls) {
  var urls = [];

  while ((match = stringRegex.exec(relativeUrls)) !== null) {
    if (match[2].startsWith('.')) {
      urls.push('"' + basePath + match[2].substr(1) + '"');
    } else {
      urls.push('"' + match[2] + '"');
    }
  }

  return "styleUrls: [" + urls.join(', ') + "]";
});

return load;
};