These are chat archives for AngularClass/angular2-webpack-starter

2nd
Feb 2016
Sam Jones
@ollwenjones
Feb 02 2016 15:03
@djuric42 I don't think you would create global functions for the top level component. Angular components are supposed to be a reactive state tree, so you would inject a service where you needed it that updates the model, then the components down the tree should be subscribed to the model changes and update themselves based on that state. Or else use events.
binarious
@binarious
Feb 02 2016 19:40
@nfmmonteiro Why are you suggesting a function? What's wrong with:
public static OK: number = 200;
Nuno Monteiro
@nfmmonteiro
Feb 02 2016 21:11
@binarious there's nothing wrong using public static OK:number = 200; However, if you do that you are not declaring a constant - you are declaring a variable that can be changed... and that was not the initial question: how can I declare a class constant in typescript :)