【发布时间】:2023-03-23 23:05:02
【问题描述】:
我正在尝试创建一个简单的 Spring Boot Web 应用程序。我在前端使用 Thymeleaf 和 AngularJs。
一切正常,直到我尝试在我的应用程序中添加 ui.router。
下面是我的 app.config:
.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/home');
$stateProvider
.state('home', {
url: '/home',
template: index1.html
})
})
当我运行我的应用程序时,部分“index1.html”未加载到 ui-view 中。
我收到错误,因为“http://localhost:8080/index.html 是错误请求”
据我了解,templateUrl 已磨损。请指导我做对。
【问题讨论】:
标签: angularjs spring-boot angular-ui-router thymeleaf