change global variable to angular constant