acq-ng-metadata
Version:
Angular 2 decorators and utils for Angular 1.x
17 lines (11 loc) • 421 B
Markdown
# Constants
In angular 1 with ES5 there was no module system so you had to register "shareable" constants to angular container for DI, via
`ngModule.constant('myFoo','whoopsie!)`
Those times are long gone now, use ES2015 modules for import/export
```typescript
// actions.ts
export const INCREMENT = 'INCREMENT'
export const DECREMENT = 'DECREMENT';
// reducers.ts
import {INCREMENT,DECREMENT} from './actions';
```