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

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

Ansible warning on jinja2 braces on when -