コード例 #1
0
        public override void Discover(ClientRouteTableBuilder builder) {
            builder.Describe("EntityDetail.Views")
                .Configure(descriptor => {
                    descriptor.Url = "/Views";
                })
                .View(view => {
                    view.TemplateUrl = "'SystemAdmin/Projections/List'";
                    view.Controller = "ProjectionListCtrl";
                    view.Dependencies = ToClientUrl(new[] {"controllers/listcontroller"});
                });

            builder.Describe("ProjectionCreate")
                .Configure(descriptor => {
                    descriptor.Url = "/Projections/{EntityName:[0-9a-zA-Z]+}/Create";
                })
                .View(view => {
                    view.TemplateUrl = "function(params) { return 'SystemAdmin/Projections/Create/' + params.EntityName;}";
                    view.Controller = "ProjectionDetailCtrl";
                    view.Dependencies = ToClientUrl(new[] {"controllers/detailcontroller"});
                });

            builder.Describe("ProjectionEdit")
                .Configure(descriptor => {
                    descriptor.Url = "/Projections/{EntityName:[0-9a-zA-Z]+}/{Id:[0-9a-zA-Z]+}";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                                                var url = 'SystemAdmin/Projections/Edit/' + $stateParams.Id; 
                                                return $http.get(url).then(function(response) { return response.data; });
                                          }]";
                    view.Controller = "ProjectionDetailCtrl";
                    view.Dependencies = ToClientUrl(new[] {"controllers/detailcontroller"});
                });
        }
コード例 #2
0
        public IEnumerable <ClientRouteDescriptor> GetRouteTable(bool isFrontEnd)
        {
            Logger.Information("Start building shape table");

            var alterationSets = _parallelCacheContext.RunInParallel(
                _clientRouteProviders.Where(provider => provider.Value.IsFrontEnd == isFrontEnd), provider => {
                var feature = provider.Metadata.ContainsKey("Feature") ?
                              (Feature)provider.Metadata["Feature"] :
                              null;

                var builder = new ClientRouteTableBuilder(feature);
                provider.Value.Discover(builder);
                return(builder.BuildAlterations().ToReadOnlyCollection());
            });

            var alterations = alterationSets
                              .SelectMany(shapeAlterations => shapeAlterations)
                              .ToList();
            var distinctRouteNames = alterations.GroupBy(item => item.RouteName, StringComparer.OrdinalIgnoreCase)
                                     .Select(item => item.Key).ToList();

            var routes = GenerateRoutes(distinctRouteNames, alterations);

            Logger.Information("Done building shape table");
            return(routes);
        }
コード例 #3
0
        public object GetRouteTable(bool isFrontEnd) {

            //return _cacheManager.Get<string, object>("ClientRouteTable", x => {
                Logger.Information("Start building shape table");

            var alterationSets = _parallelCacheContext.RunInParallel(
                _clientRouteProviders.Where(provider => provider.Value.IsFrontEnd == isFrontEnd), provider => {
                    var feature = provider.Metadata.ContainsKey("Feature") ?
                                      (Feature) provider.Metadata["Feature"] :
                                      null;

                    var builder = new ClientRouteTableBuilder(feature);
                    provider.Value.Discover(builder);
                    return builder.BuildAlterations().ToReadOnlyCollection();
                });

                var alterations = alterationSets
                    .SelectMany(shapeAlterations => shapeAlterations)
                    .ToList();

                var routeNodes = alterations.GroupBy(alteration => alteration.RouteName, StringComparer.OrdinalIgnoreCase)
                                            .Select(group => new ClientRouteNode {Name = GetRouteName(group.Key), FullName = group.Key})
                                            .ToList();

                var rootNodes = routeNodes.Where(node => !node.FullName.Contains("."));
                PopulateChildren(routeNodes);

                var routes = GenerateRoutes(rootNodes, alterations);

                Logger.Information("Done building shape table");
                return routes;
            //});
        }
コード例 #4
0
        public override void Discover(ClientRouteTableBuilder builder) {
            
            builder.Describe("List")
                .Configure(descriptor => {
                    descriptor.Url = "/{Module:[a-zA-Z]+}";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                        var url = 'Coevery/' + $stateParams.Module + '/ViewTemplate/List/' + $stateParams.Module;
                        return $http.get(url).then(function (response) { return response.data; });
                    }]";
                    view.Controller = "GeneralListCtrl";
                    view.Dependencies = ToClientUrl(new[] { "controllers/listcontroller" });
                });

            builder.Describe("Create")
                .Configure(descriptor => {
                    descriptor.Url = "/{Module:[a-zA-Z]+}/Create";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                        var url = 'Coevery/' + $stateParams.Module + '/ViewTemplate/Create/' + $stateParams.Module;
                        return $http.get(url).then(function (response) { return response.data; });
                    }]";
                    view.Controller = "GeneralDetailCtrl";
                    view.Dependencies = ToClientUrl(new[] { "controllers/detailcontroller" });
                });

            builder.Describe("Detail")
                .Configure(descriptor => {
                    descriptor.Url = "/{Module:[a-zA-Z]+}/{Id:[0-9a-zA-Z]+}";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                        var url = 'Coevery/' + $stateParams.Module + '/ViewTemplate/Edit/' + $stateParams.Id;
                        return $http.get(url).then(function (response) { return response.data; });
                    }]";
                    view.Controller = "GeneralDetailCtrl";
                    view.Dependencies = ToClientUrl(new[] { "controllers/detailcontroller" });
                });

            builder.Describe("View")
                .Configure(descriptor => {
                    descriptor.Url = "/{Module:[a-zA-Z]+}/View/{Id:[0-9a-zA-Z]+}";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                        var url = 'Coevery/' + $stateParams.Module + '/ViewTemplate/View/' + $stateParams.Id;
                        return $http.get(url).then(function (response) { return response.data; });
                    }]";
                    view.Controller = "GeneralViewCtrl";
                    view.Dependencies = ToClientUrl(new[] { "controllers/viewcontroller", "controllers/relatedentitylistcontroller" });
                });
        }
コード例 #5
0
 public override void Discover(ClientRouteTableBuilder builder) {
     builder.Describe("FieldEdit")
         .Configure(descriptor => {
             descriptor.Abstract = true;
         });
     builder.Describe("FieldEdit.Items")
         .View(view => {
             view.TemplateUrl = "'SystemAdmin/OptionSet/List'";
             view.Controller = "OptionItemsCtrl";
             view.Dependencies = ToClientUrl(new[] { "controllers/optionitemeditcontroller", "services/optionitemdataservice" });
         });
 }
コード例 #6
0
ファイル: ClientRouteProvider.cs プロジェクト: wezmag/Coevery
 public override void Discover(ClientRouteTableBuilder builder) {
     builder.Describe("FieldEdit")
         .Configure(descriptor => {
             descriptor.Abstract = true;
         });
     builder.Describe("FieldEdit.Items")
         .View(view => {
             view.TemplateUrl = "'" + ModuleBasePath + @"List'";
             view.Controller = "OptionItemsCtrl";
             view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/optionitemeditcontroller", "services/optionitemdataservice" });
         });
 }
コード例 #7
0
        public override void Discover(ClientRouteTableBuilder builder) {

            builder.Describe("FormDesigner")
                .Configure(descriptor => {
                    descriptor.Url = "/FormDesigner/{EntityName:[0-9a-zA-Z]+}";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                                                var url = 'SystemAdmin/FormDesigner/Index/' + $stateParams.EntityName; 
                                                return $http.get(url).then(function(response) { return response.data; });
                                          }]";
                    view.Controller = "FormDesignerCtrl";
                    view.Dependencies = ToClientUrl(new[] {"controllers/formdesignercontroller"});
                });
        }
コード例 #8
0
        public IEnumerable<ClientRouteDescriptor> GetRouteTable(bool isFrontEnd) {
            Logger.Information("Start building shape table");

            var alterationSets = _parallelCacheContext.RunInParallel(
                _clientRouteProviders.Where(provider => provider.Value.IsFrontEnd == isFrontEnd), provider => {
                    var feature = provider.Metadata.ContainsKey("Feature") ?
                        (Feature) provider.Metadata["Feature"] :
                        null;

                    var builder = new ClientRouteTableBuilder(feature);
                    provider.Value.Discover(builder);
                    return builder.BuildAlterations().ToReadOnlyCollection();
                });

            var alterations = alterationSets
                .SelectMany(shapeAlterations => shapeAlterations)
                .ToList();
            var distinctRouteNames = alterations.GroupBy(item => item.RouteName, StringComparer.OrdinalIgnoreCase)
                .Select(item => item.Key).ToList();

            var routes = GenerateRoutes(distinctRouteNames, alterations);
            Logger.Information("Done building shape table");
            return routes;
        }
コード例 #9
0
 public abstract void Discover(ClientRouteTableBuilder builder);
コード例 #10
0
        public override void Discover(ClientRouteTableBuilder builder) {
            builder.Describe("EntityList")
                .Configure(descriptor => {
                    descriptor.Url = "/Entities";
                })
                .View(view => {
                    view.TemplateUrl = "'SystemAdmin/Entities/List'";
                    view.Controller = "EntityListCtrl";
                    view.Dependencies = ToClientUrl(new[] {"controllers/listcontroller"});
                });

            builder.Describe("EntityCreate")
                .Configure(descriptor => {
                    descriptor.Url = "/Entities/Create";
                })
                .View(view => {
                    view.TemplateUrl = "'SystemAdmin/Entities/Create'";
                    view.Controller = "EntityEditCtrl";
                    view.Dependencies = ToClientUrl(new[] {"controllers/editcontroller"});
                });

            builder.Describe("EntityEdit")
                .Configure(descriptor => {
                    descriptor.Url = "/Entities/{Id:[0-9a-zA-Z]+}/Edit";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                                                var url = 'SystemAdmin/Entities/Edit/' + $stateParams.Id; 
                                                return $http.get(url).then(function(response) { return response.data; });
                                          }]";
                    view.Controller = "EntityEditCtrl";
                    view.Dependencies = ToClientUrl(new[] {"controllers/editcontroller"});
                });

            builder.Describe("EntityDetail")
                .Configure(descriptor => {
                    descriptor.Abstract = true;
                    descriptor.Url = "/Entities/{Id:[0-9a-zA-Z]+}";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                                                var url = 'SystemAdmin/Entities/Detail/' + $stateParams.Id; 
                                                return $http.get(url).then(function(response) { return response.data; });
                                          }]";
                    view.Controller = "EntityDetailCtrl";
                    view.Dependencies = ToClientUrl(new[] {"controllers/detailcontroller"});
                });

            builder.Describe("EntityDetail.Fields")
                .View(view => {
                    view.TemplateUrl = "'SystemAdmin/Entities/Fields'";
                    view.Controller = "FieldsCtrl";
                    view.Dependencies = ToClientUrl(new[] {"controllers/fieldscontroller"});
                });

            #region Operate fields

            builder.Describe("EntityDetail.Fields.Create")
                .Configure(descriptor => {
                    descriptor.Url = "/Create";
                })
                .View(view => {
                    view.TemplateUrl = "function(params) { return 'SystemAdmin/Entities/CreateChooseType/' + params.Id; }";
                    view.Controller = "FieldCreateChooseTypeCtrl";
                    view.Dependencies = ToClientUrl(new string[] {"controllers/createchoosetypecontroller"});
                });

            builder.Describe("EntityDetail.Fields.CreateEditInfo")
                .Configure(descriptor => {
                    descriptor.Url = "/Create/{FieldTypeName:[0-9a-zA-Z]+}";
                    })
                .View(view => {
                    view.TemplateUrl = "function(params) { return 'SystemAdmin/Entities/CreateEditInfo/' + params.Id + '?FieldTypeName=' + params.FieldTypeName; }";
                    view.Controller = "FieldCreateEditInfoCtrl";
                    view.Dependencies = ToClientUrl(new string[] {"controllers/createeditinfocontroller"});
                });

            builder.Describe("FieldEdit")
                .Configure(descriptor => {
                    descriptor.Url = "/Fields/{EntityName:[0-9a-zA-Z]+}/Edit/{FieldName:[0-9a-zA-Z]+}";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                                                var url = 'SystemAdmin/Entities/EditFields/' + $stateParams.EntityName + '?FieldName=' + $stateParams.FieldName;
                                                return $http.get(url).then(function(response) { return response.data; });
                                          }]";
                    view.Controller = "FieldEditCtrl";
                    view.Dependencies = ToClientUrl(new string[] {"controllers/editfieldscontroller"});
                });

            builder.Describe("FieldDependencyList")
                .Configure(descriptor => {
                    descriptor.Url = "/Fields/{EntityName:[0-9a-zA-Z]+}/Dependencies";
                })
                .View(view => {
                    view.TemplateUrl = "function(params) { return 'SystemAdmin/Entities/DependencyList/' + params.EntityName; }";
                    view.Controller = "FieldDependencyListCtrl";
                    view.Dependencies = ToClientUrl(new string[] {"controllers/dependencylistcontroller"});
                });

            builder.Describe("FieldDependencyCreate")
                .Configure(descriptor => {
                    descriptor.Url = "/Fields/{EntityName:[0-9a-zA-Z]+}/Dependencies/Create";
                })
                .View(view => {
                    view.TemplateUrl = "function(params) { return 'SystemAdmin/Entities/CreateDependency/' + params.EntityName; }";
                    view.Controller = "FieldDependencyCreateCtrl";
                    view.Dependencies = ToClientUrl(new string[] {"controllers/dependencycreatecontroller"});
                });

            builder.Describe("FieldDependencyEdit")
                .Configure(descriptor => {
                    descriptor.Url = "/Fields/{EntityName:[0-9a-zA-Z]+}/Dependencies/{DependencyID:[0-9]+}";
                })
                .View(view => {
                    view.TemplateUrl = "function(params) { return 'SystemAdmin/Entities/EditDependency/' + params.EntityName + '?DependencyID=' + params.DependencyID; }";
                    view.Controller = "FieldDependencyEditCtrl";
                    view.Dependencies = ToClientUrl(new string[] {"controllers/dependencyeditcontroller"});
                });

            #endregion
        }
コード例 #11
0
 public abstract void Discover(ClientRouteTableBuilder builder);
コード例 #12
0
ファイル: ClientRouteProvider.cs プロジェクト: wezmag/Coevery
        public override void Discover(ClientRouteTableBuilder builder) {
            var navigationView = new ClientViewDescriptor() {
                Name = "menulist",
                TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                        var url = '" + ModuleBasePath + @"ViewTemplate/MenuList';
                        return $http.get(url).then(function (response) { return response.data; });
                    }]",
                Controller = "NavigationCtrl"
            };
            navigationView.AddDependencies(ToAbsoluteScriptUrl, "controllers/navigationcontroller");

            builder.Describe("Root")
                .Configure(descriptor => {
                    descriptor.Url = "/";
                    descriptor.Views.Add(navigationView);
                });

            builder.Describe("Navigation")
                .Configure(descriptor => {
                    descriptor.Url = "/{NavigationId:[0-9]+}";
                    descriptor.Views.Add(navigationView);
                });

            builder.Describe("List")
                .Configure(descriptor => {
                    descriptor.Url = "/{NavigationId:[0-9]+}/{Module:[a-zA-Z]+}";
                    descriptor.Views.Add(navigationView);
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                        var url = '" + BasePath + @"' + $stateParams.Module + '/ViewTemplate/List/' + $stateParams.Module;
                        return $http.get(url).then(function (response) { return response.data; });
                    }]";
                    view.Controller = "GeneralListCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/listcontroller" });
                });

            builder.Describe("Create")
                .Configure(descriptor => {
                    descriptor.Url = "/{NavigationId:[0-9]+}/{Module:[a-zA-Z]+}/Create";
                    descriptor.Views.Add(navigationView);
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                        var url = '" + BasePath + @"' + $stateParams.Module + '/ViewTemplate/Create/' + $stateParams.Module;
                        return $http.get(url).then(function (response) { return response.data; });
                    }]";
                    view.Controller = "GeneralDetailCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/detailcontroller" });
                });

            builder.Describe("Detail")
                .Configure(descriptor => {
                    descriptor.Url = "/{NavigationId:[0-9]+}/{Module:[a-zA-Z]+}/{Id:[0-9a-zA-Z]+}";
                    descriptor.Views.Add(navigationView);
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                        var url = '" + BasePath + @"'+ $stateParams.Module + '/ViewTemplate/Edit/' + $stateParams.Id;
                        return $http.get(url).then(function (response) { return response.data; });
                    }]";
                    view.Controller = "GeneralDetailCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new[] { "controllers/detailcontroller" });
                });

            builder.Describe("View")
                .Configure(descriptor => {
                    descriptor.Url = "/{NavigationId:[0-9]+}/{Module:[a-zA-Z]+}/View/{Id:[0-9a-zA-Z]+}";
                    descriptor.Views.Add(navigationView);
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                        var url = '" + BasePath + @"' + $stateParams.Module + '/ViewTemplate/View/' + $stateParams.Id;
                        return $http.get(url).then(function (response) { return response.data; });
                    }]";
                    view.Controller = "GeneralViewCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, "controllers/viewcontroller");
                });
        }
コード例 #13
0
ファイル: ClientRouteProvider.cs プロジェクト: wezmag/Coevery
 public override void Discover(ClientRouteTableBuilder builder) {
     builder.Describe("View")
         .View(view => view.AddDependencies(ToAbsoluteScriptUrl, "controllers/relatedentitylistcontroller"));
 }
コード例 #14
0
ファイル: ClientRouteProvider.cs プロジェクト: wezmag/Coevery
        public override void Discover(ClientRouteTableBuilder builder) {
            builder.Describe("EntityDetail.Relationships")
                .Configure(descriptor => {
                    descriptor.Url = "/Relationships";
                })
                .View(view => {
                    view.TemplateUrl = "'" + ModuleBasePath + @"Relationships'";
                    view.Controller = "RelationshipsCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new[] {"controllers/relationshipscontroller"});
                });

            builder.Describe("CreateOneToMany")
                .Configure(descriptor => {
                    descriptor.Url = "/Relationships/{EntityName:[0-9a-zA-Z]+}/CreateOneToMany";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                                                var url = '" + ModuleBasePath + @"CreateOneToMany/' + $stateParams.EntityName;
                                                return $http.get(url).then(function(response) { return response.data; });
                                          }]";
                    view.Controller = "CreateOneToManyCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new [] {"controllers/onetomanydetailcontroller"});
                });

            builder.Describe("EditOneToMany")
                .Configure(descriptor => {
                    descriptor.Url = "/Relationships/{EntityName:[0-9a-zA-Z]+}/EditOneToMany/{RelationId:[0-9]+}";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                                                var url = '" + ModuleBasePath + @"EditOneToMany/' + $stateParams.EntityName+ '?RelationId=' + $stateParams.RelationId;
                                                return $http.get(url).then(function(response) { return response.data; });
                                          }]";
                    view.Controller = "EditOneToManyCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new string[] {"controllers/editonetomanycontroller"});
                });

            builder.Describe("CreateManyToMany")
                .Configure(descriptor => {
                    descriptor.Url = "/Relationships/{EntityName:[0-9a-zA-Z]+}/CreateManyToMany";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                                                var url = '" + ModuleBasePath + @"CreateManyToMany/' + $stateParams.EntityName;
                                                return $http.get(url).then(function(response) { return response.data; });
                                          }]";
                    view.Controller = "CreateManyToManyCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new [] {"controllers/manytomanydetailcontroller"});
                });

            builder.Describe("EditManyToMany")
                .Configure(descriptor => {
                    descriptor.Url = "/Relationships/{EntityName:[0-9a-zA-Z]+}/EditManyToMany/{RelationId:[0-9]+}";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                                                var url = '" + ModuleBasePath + @"EditManyToMany/' + $stateParams.EntityName+ '?RelationId=' + $stateParams.RelationId;
                                                return $http.get(url).then(function(response) { return response.data; });
                                          }]";
                    view.Controller = "EditManyToManyCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new [] {"controllers/editmanytomanycontroller"});
                });

            builder.Describe("View")
                .View(view => view.AddDependencies(ToAbsoluteScriptUrl, "controllers/relatedentitylistcontroller"));
        }
コード例 #15
0
ファイル: ClientRouteProvider.cs プロジェクト: wezmag/Coevery
        public override void Discover(ClientRouteTableBuilder builder) {
            builder.Describe("PerspectiveList")
                .Configure(descriptor => {
                    descriptor.Url = "/Perspectives";
                })
                .View(view => {
                    view.TemplateUrl = "'" + ModuleBasePath + @"List'";
                    view.Controller = "PerspectiveListCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/listcontroller" });
                });

            builder.Describe("PerspectiveCreate")
                .Configure(descriptor => {
                    descriptor.Url = "/Perspectives/Create";
                })
                .View(view => {
                    view.TemplateUrl = "'" + ModuleBasePath + @"Create'";
                    view.Controller = "PerspectiveEditCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/editcontroller" });
                });

            builder.Describe("PerspectiveEdit")
                .Configure(descriptor => {
                    descriptor.Url = "/Perspectives/{Id:[0-9a-zA-Z]+}/Edit";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                                                var url = '" + ModuleBasePath + @"Edit/' + $stateParams.Id; 
                                                return $http.get(url).then(function(response) { return response.data; });
                                          }]";
                    view.Controller = "PerspectiveEditCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/editcontroller" });
                });

            builder.Describe("PerspectiveDetail")
                .Configure(descriptor => {
                    descriptor.Url = "/Perspectives/{Id:[0-9a-zA-Z]+}";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                                                var url = '" + ModuleBasePath + @"Detail/' + $stateParams.Id; 
                                                return $http.get(url).then(function(response) { return response.data; });
                                          }]";
                    view.Controller = "PerspectiveDetailCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/detailcontroller" });
                });

            builder.Describe("CreateNavigationItem")
                .Configure(descriptor => {
                    descriptor.Url = "/Perspectives/{Id:[0-9a-zA-Z]+}/Navigation/Create";
                })
                .View(view => {
                    view.TemplateUrl = "function(params) { return '" + ModuleBasePath + @"CreateNavigationItem/' + params.Id;}";
                    view.Controller = "NavigationItemEditCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/navigationitemeditcontroller" });
                });

            builder.Describe("EditNavigationItem")
                .Configure(descriptor => {
                    descriptor.Url = "/Perspectives/{Id:[0-9a-zA-Z]+}/Navigation/{NId:[0-9a-zA-Z]+}";
                })
                .View(view => {
                    view.TemplateProvider = @"['$http', '$stateParams', function ($http, $stateParams) {
                                                var url = '" + ModuleBasePath + @"EditNavigationItem/' + $stateParams.NId; 
                                                return $http.get(url).then(function(response) { return response.data; });
                                          }]";
                    view.Controller = "NavigationItemEditCtrl";
                    view.AddDependencies(ToAbsoluteScriptUrl, new string[] { "controllers/navigationitemeditcontroller" });
                });
        }