I'm starting to upgrade an AngularJS app to Angular 4, and I'm trying to bootstrap it using the upgrade adapter like this in the ('entry' file for the app) - where the function is within a closure, in an independent app.ts file :
app.ts (was previously App.js):
(function () {
import { UpgradeAdapter } from '@angular/upgrade';
var adapter = new UpgradeAdapter();
adapter.bootstrap(document.body, ['portalHomeApp']);
angular
.module('portalHomeApp', ['shared']);
I'm getting an error for the initial import of UpgradeAdapter:
An import declaration can only be used in a namespace or module
What do I need to do? Do I somehow make it available to the 'portalHomeApp' module, or do I simply now need a namespace now that I'm using TypeScript?