I do something very similar to this. Each feature is in a separate module and 
each module defines its own routes in a config method call.

---
R. Mark Volkmann
Object Computing, Inc.

> On Feb 21, 2014, at 5:15 AM, Mauro Servienti <[email protected]> wrote:
> 
> I usually approaches it in the following manner. The folder structure of the 
> project at the root level represents the modules:
> 
> /App
> app.js
> /Dashboard
> /Presentation
> -> here there are views and controllers
> _module.js
> /Accounting
> /Marketing
> /BlaBla
> 
> The app.js file contains the modules definitions, such as:
> 
> angular.module(‘dashboard’, [...]);
> 
> and the app run and config functions, in the app config function I define 
> routes that are app wide and not module wide.
> 
> in each “module” folder there is a “_module.js” file, where the _ is just an 
> easy way to be sure than in an explorer/finder window the file stays on top, 
> the _module.js file simply defines the module config function where the 
> routeProvider (in my case) is injected and the module has the opportunity to 
> define its own route.
> 
> Now it is simply a matter of being sure the files are loaded by the browser 
> in the correct order.
> 
> .m
> --
> (no keyboard keys have been killed due to the really annoying OSX spell 
> checker)
> 
>> On 21/feb/2014, at 12:03, Pushpendra Kumar <[email protected]> wrote:
>> 
>> Yes sure,
>> 
>>                     Please share if anybody know its solution.
>> 
>> 
>> Pushpendra
>> 
>> 
>>> On 21 February 2014 15:56, Adam Zieliński <[email protected]> wrote:
>>> if you found good solution share it please ;)
>>> 
>>> W dniu środa, 5 lutego 2014 14:40:08 UTC+1 użytkownik Pushpendra Kumar 
>>> napisał:
>>>> Hello All,
>>>> 
>>>>             I am new to angular.js.
>>>>             I am developing a large application with angular.js.
>>>>             I have developed one module till now and for this model I have 
>>>> created 25 routes in my app.js file as:
>>>> 
>>>> var mySmApp = angular.module("smApp", ['ngRoute', 'ngTable']);
>>>> mySmApp.config(function($routeProvider) {
>>>> $routeProvider
>>>> .when("/", {
>>>> controller : "loginController",
>>>> templateUrl: "modules/login/partials/loginForm.html"
>>>> })
>>>> .when("/home", {
>>>> templateUrl: "common/partials/home.html"
>>>> })
>>>> .when("/userAdmin", {
>>>> controller : "userController",
>>>> templateUrl: "modules/user/partials/userForm.html",
>>>> resolve: {
>>>> action: function(){return "create";}
>>>> }
>>>> })
>>>> .when("/update/:updateUserId", {
>>>> controller : "userController",
>>>> templateUrl: "modules/user/partials/userForm.html",
>>>> resolve: {
>>>> action: function(){return "update";}
>>>> }
>>>> })
>>>> .otherwise({redirectTo : "/"});
>>>> });
>>>> 
>>>> 
>>>> Its my first moduel and there are 25 modules, if i go in this fashion then 
>>>> single file will have a crowd of routes.
>>>> 
>>>> Please suggest me a solution to manage the routes.
>>>> Is there any way to have router file as module specific.
>>>> Also please suggest me the naming convention for routes and files.
>>>> 
>>>> Thanks in advance,
>>>> Pushpendra
>>> 
>>> 
>>> -- 
>>> 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/groups/opt_out.
>> 
>> 
>> -- 
>> 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/groups/opt_out.
> 
> -- 
> 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/groups/opt_out.

-- 
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/groups/opt_out.

Reply via email to