angularjs - Correct Paths for Java Spring with Angular UI-router -


i've been trying implement ui-router spring getting bunch of 404s in browser. cannot seem path names correctly ui-router cannot switch view. i've looked @ similar problems on so, cannot working.

is there specific way need structure project path names work? thought ui-router's templateurl worked root of project, tried putting path name started @ project root no success. building project using maven in intellij well, unsure if affecting problem @ all.

here how project structured

i have controller ui-router structured this:

var mymod = angular.module("mymod", ['ui.router'])     .config(['$stateprovider', '$urlrouterprovider', '$locationprovider', function ($stateprovider, $urlrouterprovider, $locationprovider) {     $urlrouterprovider.otherwise('/first');      $stateprovider         .state('first', {             url: '/first',             templateurl: '/uiproject/src/main/resources/static/templates/database.html',             controller: 'bookingscontroller'         }) }]); 

my html template structured like:

<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" ng-app="mymod"> <head>     <meta charset="utf-8"/>     <script src="../static/angular.min.js" th:src="@{/angular.min.js}"></script>     <script src="../static/app/bookings.controller.js" th:src="@{/app/bookings.controller.js}"></script>     <script src="../static/angular-ui-router.min.js" th:src="@{/angular-ui-router.min.js}"></script>  </head>  <body ng-controller="bookingscontroller"> <p>this project</p> <ui-view></ui-view>  </body> </html> 

and have database.html file in same folder index.html (templates)


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -