Closed MarkJPerry closed 9 years ago
controllerProvider
seems to be very ui-router
specific implementation so I would prefer not do anything specific within angularAMD. Here is a solution to your question:
Having said that, having controllerUrl
support a function might make things a lot easier for you. I close this one and add an enhancement for next release.
Thank you for the link that's exactly what I was looking for. Apparently my google fu failed me this time.
@MarkJPerry Rather, I asked that question on stackoverflow after I saw your issue here :)
I have a need to use the
controllerProvider
overload when configuring routes in ui-router using AngularAMD but I notive that onlycontroller
andcontrollerUrl
are supported.Would it be possible for you to load both the controller and controllerUrl from the controllerProvider result which is a string specifying the controllername?
This way I can configure my application thusly:
If I am reading the source code correctly (and I may not be) you are using the AngularAMD requireJs wrapper to load the controller dynamically then pass through to angular. I couldn't find any reference to
controllerProvider
in the source.