我试图按照Angular 1到2的升级步骤进行操作。我已经输入以下代码以允许混合应用程序:
import * as angular from 'angular';
import {upgradeAdapter} from './upgrade-adapter';
angular.module('app', []);
angular.bootstrap(document.body, ['app']);
upgradeAdapter.bootstrap(document.documentElement, ['app'], {strictDi: true});
但我只是在浏览器控制台中收到以下错误消息:
SyntaxError: import declarations may only appear at top level of a module
Line: import * as angular from 'angular';