Given the TypeScript class, which is referred to as the TS module, in the CoolApps.Utilities.ts file:
module CoolApps { export class Utilities { myMethod(){ alert("something awesome"); } } }
The class works in a regular TypeScript application, but I'm trying to understand our correct way of referencing this class in Angular 2. How to use it in an Angular 2 application (Ionic 2 in case)? So far, the following does not resolve, so I probably misunderstand the syntax:
import {Page} from 'ionic-framework/ionic'; import {Utilities} from '../../core/CoolApps.Utilities';
Using such a link will allow the editor to see the code as valid, but Angular cannot solve it (maybe the import only works for Angular specific modules?):
source share