Reputation: 3900
I'm trying to export a simple object to act as a (non-sensitive) configuration container, e.g. config.ts:
export var Config {
"environment": "development"
};
And then import it elsewhere in my Angular2 application:
import {Config} from 'config';
The TS compiler, though, claims that config.ts is not a module. I've not written TS files that are to be imported elsewhere, so I'm probably missing something very simple, but could anyone point me in the correct direction for making this data import/exportable?
Upvotes: 0
Views: 90
Reputation: 657068
There is an =
missing:
export var Config = {
"environment": "development"
};
Upvotes: 3