From 1adafc5b0ba370f78ea778cb47e20c559c038dd5 Mon Sep 17 00:00:00 2001 From: Dapeng <verydapeng@gmail.com> Date: Tue, 20 Sep 2016 16:39:06 +0800 Subject: [PATCH] remove context-path --- src/main/resources/application.properties | 4 +--- .../scripts/app/owner-details/owner-details.template.html | 3 ++- .../webapp/scripts/app/owner-form/owner-form.component.js | 2 +- .../webapp/scripts/app/owner-list/owner-list.component.js | 4 ++-- src/main/webapp/scripts/app/pet-form/pet-form.component.js | 2 +- src/main/webapp/scripts/app/visits/visits.component.js | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 025f89af..cc3da5e0 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -17,6 +17,4 @@ spring.messages.basename=messages/messages management.contextPath=/manage # Logging -logging.level.org.springframework=INFO - -server.context-path=/petclinic \ No newline at end of file +logging.level.org.springframework=INFO \ No newline at end of file diff --git a/src/main/webapp/scripts/app/owner-details/owner-details.template.html b/src/main/webapp/scripts/app/owner-details/owner-details.template.html index 78220f5d..ceea8382 100644 --- a/src/main/webapp/scripts/app/owner-details/owner-details.template.html +++ b/src/main/webapp/scripts/app/owner-details/owner-details.template.html @@ -32,7 +32,8 @@ <div ng-repeat="pet in $ctrl.owner.pets"> <h3>{{pet.name}}</h3> <p> - {{pet.birthDate | date:'yyyy MMM dd'}} - {{pet.type.name}} + {{pet.birthDate | date:'yyyy MMM dd'}} - {{pet.type.name}} - + <a href="#!/owners/{{$ctrl.owner.id}}/pets/{{pet.id}}/visits">Add Visit</a> </p> <h4>Visits</h4> <p style="margin-left: 2em;" ng-repeat="visit in pet.visits"> diff --git a/src/main/webapp/scripts/app/owner-form/owner-form.component.js b/src/main/webapp/scripts/app/owner-form/owner-form.component.js index 3baf9d5f..987db5c3 100644 --- a/src/main/webapp/scripts/app/owner-form/owner-form.component.js +++ b/src/main/webapp/scripts/app/owner-form/owner-form.component.js @@ -5,7 +5,7 @@ angular.module('ownerForm', [ ]); angular.module("ownerForm").component("ownerForm", { - templateUrl: "/petclinic/scripts/app/owner-form/owner-form.template.html", + templateUrl: "scripts/app/owner-form/owner-form.template.html", controller: ["$http", '$routeParams', '$location', function ($http, $routeParams, $location) { var self = this; diff --git a/src/main/webapp/scripts/app/owner-list/owner-list.component.js b/src/main/webapp/scripts/app/owner-list/owner-list.component.js index aeb61b9e..5fa6f037 100644 --- a/src/main/webapp/scripts/app/owner-list/owner-list.component.js +++ b/src/main/webapp/scripts/app/owner-list/owner-list.component.js @@ -5,10 +5,10 @@ angular.module('ownerList', [ ]); angular.module("ownerList").component("ownerList", { - templateUrl: "/petclinic/scripts/app/owner-list/owner-list.template.html", + templateUrl: "scripts/app/owner-list/owner-list.template.html", controller: ["$http", function ($http) { var self = this; - $http.get('/petclinic/owner/list').then(function(resp) { + $http.get('owner/list').then(function(resp) { self.owners = resp.data; }); }] diff --git a/src/main/webapp/scripts/app/pet-form/pet-form.component.js b/src/main/webapp/scripts/app/pet-form/pet-form.component.js index 3de2b735..31749fea 100644 --- a/src/main/webapp/scripts/app/pet-form/pet-form.component.js +++ b/src/main/webapp/scripts/app/pet-form/pet-form.component.js @@ -5,7 +5,7 @@ angular.module('petForm', [ ]); angular.module("petForm").component("petForm", { - templateUrl: "/petclinic/scripts/app/pet-form/pet-form.template.html", + templateUrl: "scripts/app/pet-form/pet-form.template.html", controller: ["$http", '$routeParams', '$location', function ($http, $routeParams, $location) { var self = this; var ownerId = $routeParams.ownerId || 0; diff --git a/src/main/webapp/scripts/app/visits/visits.component.js b/src/main/webapp/scripts/app/visits/visits.component.js index 706b4823..f8de1cb8 100644 --- a/src/main/webapp/scripts/app/visits/visits.component.js +++ b/src/main/webapp/scripts/app/visits/visits.component.js @@ -5,7 +5,7 @@ angular.module('visits', [ ]); angular.module("visits").component("visits", { - templateUrl: "/petclinic/scripts/app/visits/visits.template.html", + templateUrl: "scripts/app/visits/visits.template.html", controller: ["$http", '$routeParams', '$location', '$filter', function ($http, $routeParams, $location, $filter) { var self = this; var petId = $routeParams.petId || 0; -- GitLab