Given a TypeScript class which is namespaced as a TS module, in a file CoolApps.Utilities.ts:
module CoolApps {
export class Utilities {
myMethod(){
alert("something awesome");
}
}
}
The class works in a normal TypeScript app but I'm trying to figure our the correct way to reference this class in Angular 2. How do I use this in an Angular 2 app (Ionic 2 in the case)? So far the following doesn't resolve so I'm probably getting the syntax wrong:
import {Page} from 'ionic-framework/ionic';
import {Utilities} from '../../core/CoolApps.Utilities';
Using a reference like so will allow the editor to see the code as valid, but Angular can't resolve it (maybe import only works for Angular specific modules?):
///<reference path="../../core/mapping/OCM.Mapping.ts"/>