In angularjs, do we have anything on app.js level to determine the application URL.
I know inside the application, we can use $location.path() to determine it, but app.js we dont have $location
Basically, the need is to enable and disable the console logging for the application using a URL param switch.
Idea is
http://www.test-website.com/ - Will run and not fetch console.log
http://www.test-website.com?debug=1 - Will run and fetch console.log (s) for the application.
Thanks in advance!!!
$locationin any function that includes it as a dependency. Without any code, it's hard to know what you are doing, but there is no reason why$locationwould not be available to code inside an app.js file.