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

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -