Tuesday, 21 September 2021

Angular Init Model as an array (using object with value)

 To export a model in angular as an array, we can use export object with value of 1 workaround :

https://stackoverflow.com/questions/48165514/how-to-export-an-array-in-typescript


export let ObjectStyles = {};
ObjectStyles[ContextMenus.OBJECT_COLOR_RED] = '#f00';
ObjectStyles[ContextMenus.OBJECT_COLOR_GREEN] = '#0f0'
ObjectStyles[ContextMenus.OBJECT_COLOR_BLUE] = '#00f';

No comments:

Post a Comment