I a new to Angular and I just completed a tutorial from Code School for beginners in Angular. Now in the second video the instructor of the course says that we are going to wrap our whole application code into a closure. The link to the video is below. He says this somewhere at 00:30. Now why is it a good practice to wrap our code into a closure?
Link to the video
Closures are primarily used to create private scope and avoid variables from leaking into the global scope.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With