Skip to content Skip to sidebar Skip to footer

Angularjs + Typescript: Uncaught Typeerror: Cannot Read Property 'module' Of Undefined

I'm trying to use TypeScript in an AngularJS 1.x application. My application already uses Webpack as a module loader, so I configured it to handle the TypeScript compilation (after

Solution 1:

I finally found the solution.

When using TypeScript, AngularJS needs to be imported using:

import * as angular from 'angular';

The problem was that I was still importing it as I did with es6:

import angular from 'angular';

Post a Comment for "Angularjs + Typescript: Uncaught Typeerror: Cannot Read Property 'module' Of Undefined"