lets take
app.js
angular.module ("mainModule",['EntryControllerModule', function () {
.when('/entry',
{
controller: 'EntryController',
templateUrl: relPath + 'entry.html',
resolve: {
loadEntryController: loadEntryController
}
})
}]);
EntryController.js
angular.module("EntryControllerModule",[]).
controller("loadEntryController", function () {
// your stuff
});
index.html
import both files app.js and EntryController.js
On Saturday, 7 June 2014 13:14:16 UTC+5:30, Chris Dieringer wrote:
>
> Hi all:
>
> I have a route as follows, placed in a traditional app.js:
>
> .when('/entry',
> {
> controller: 'EntryController',
> templateUrl: relPath + 'entry.html',
> resolve: {
> loadEntryController: *###* EntryController.loadEntryController,
> OR $controller('EntryController').loadEntryController OR ??? *###*
> }
> })
>
> EntryController.js lives in a different folder, and is included in after
> app.js. How do I get access to the EntryController here?
>
> Thanks,
>
> Chris
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.