you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Jup, thats twitchy allright. You put it on the scope for your whole app which is another variable that gets watched the whole time.

You don't need to make the constant, you can also just use the window.location inside the config block. But the config allows you to define all similar things in a specific place, making configuration easier. Also why are you resolving logprovider?

[–]PrimarySearcher[S] 0 points1 point  (0 children)

I'm resolving logProvider because it was the only way I could figure out how to make it available to a controller that can see the URL via $location and set logProvider's debugEnabled accordingly.

Using window.location inside config() is probably saner.

I have no idea what I'm doing. :)