0

I'm trying to follow the upgrade steps for Angular 1 to 2. I've put in the following code to allow for a hybrid application:

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});

But I'm just getting the following error message in the browser console:

SyntaxError: import declarations may only appear at top level of a module
Line: import * as angular from 'angular';
Willis
  • 161
  • 1
  • 12

0 Answers0