I'm currently trying to upgrade my angular 1 app from typings to @types .
First I received the following error message:
Identifier 'angular' must be imported from a module
After some searching, I found out that angular is no longer available globally. Or at least I didn’t find out how ...
With typings , angular was global, and I could use it without importing or anything else. My problem is that the import is angular, for example:
import * as angular from 'angular';
breaks my application: Unfortunately, SystemJS now trying to load angular, and because of this, it is not available when ui-bootstrap and other libraries are loaded with script tags.
To fix this, I would have to rewrite a huge part of the build pipeline. So I ask again: is there another way to use angular with TypeScript 2 and @types that doesn't end with require('angular') ?
source share