$routeProvider and $location are special in that can be injected into .config. It may be that they are actually implemented as special constants. I do not believe that non constant providers can be injected.
Do you have a fiddle or plunk that shows this working?