Angularjs Routeprovider和stateprovider一起出现在我的Angular 1应用程序中

Angularjs Routeprovider和stateprovider一起出现在我的Angular 1应用程序中,angularjs,angularjs-directive,angular-ui-router,Angularjs,Angularjs Directive,Angular Ui Router,我正在尝试使用Angular 1.4开发一个应用程序(参见下图)。我需要以下建议 在这种情况下,开发主页的最佳方式是什么。我应该使用(UI路由)来创建8个状态,还是应该使用8个不同的自定义指令来创建选项卡(tab1、tab2、tab3等) 我的应用程序能否在配置文件中同时包含routeprovider和stateprovider。() ---------------------------------------------------------------------------> 我对

我正在尝试使用Angular 1.4开发一个应用程序(参见下图)。我需要以下建议

  • 在这种情况下,开发主页的最佳方式是什么。我应该使用
    (UI路由)来创建8个状态,还是应该使用8个不同的自定义指令来创建选项卡(tab1、tab2、tab3等)
  • 我的应用程序能否在配置文件中同时包含routeprovider和stateprovider。()
--------------------------------------------------------------------------->

我对开发此功能的看法/想法-->

  • 将使用
    ng视图
    加载页面(主页、导航2、导航3等)

  • 将使用
    ui视图
    加载主页内的选项卡/面板(选项卡1、选项卡2、选项卡3等)


同时使用
ng视图
ui视图
不会在文件中显示任何结果。i、 例如,应用程序崩溃。。因此,我转到了
ui视图
,以显示所有状态

下面是工作正常的代码。

.config(函数($urlRouterProvider,$stateProvider){
$urlRouterProvider。否则('/home');
$stateProvider
.州(“家”{
网址:“/home”,
观点:{
"":{
templateUrl:“views/home.html”
},
"profile@home":{
templateUrl:“views/home/profile.html”
},
"companyAnnouncement@home":{
templateUrl:“views/home/company announcement.html”
},
"leaveBalance@home":{
templateUrl:“views/home/leave balance.html”
},
"leaveDetails@home":{
templateUrl:“views/home/leave details.html”
},
"attendenceDetails@home":{
templateUrl:“views/home/attentience details.html”
},
"holidayList@home":{
templateUrl:“views/home/holiday list.html”
},
"queryStatus@home":{
templateUrl:“views/home/query status.html”
},
"payrolQueryStatus@home":{
templateUrl:“views/home/payrol查询状态.html”
}
}//风景到此为止
})
.state(“登录”{
url:“/login”,
templateUrl:“views/login.html”
})
.state(“自助服务”{
url:“/自助服务”,
观点:{
"":{
templateUrl:“views/self-service.html”
}
}
})
.state(“edirectory”{
url:“/edirectory”,
templateUrl:“视图/edirectory.html”,
控制器:“eDirectory控制器”,
controllerAs:'edirectoryCtrl',
决心:{
employeeList:函数(edirectoryService){
返回edirectoryService.getAllEmployees();
}
}
})
.state(“myLeave”{
url:“/我的离开”,
templateUrl:“views/my leave.html”
})
.state(“出席”{
url:“/出席”,
templateUrl:“views/attentince.html”
})
.state(“复合请求”{
url:“/comp off请求”,
templateUrl:“视图/comp off request.html”
})
.state(“raiseQuery”{
url:“/raise query”,
templateUrl:“views/raise query.html”
})
.state(“eacademy”{
url:“/eacademy”,
templateUrl:“views/eacademy.html”
})
.state(“下载”{
url:“/下载”,
templateUrl:“views/downloads.html”
});
});