AngularJS constants vs global JavaScript variables -


in angularjs application benefit of using constants , vs creating window scoped variables in javascript?

i can define global variables in js doing :

<script type="text/javascript">const global_variable= "myvalue"</script> 

instead of angular way of declaring constant, injecting controller, , setting on scope


Comments

Popular posts from this blog

html - How to custom Bootstrap grid height? -

javascript - pass values from mssql to views in node -

image - python get coordinates (pixels) of corresponding points from clicks -