Commit 3777ff49 authored by Ubuntu's avatar Ubuntu
Browse files

Fixed for relative paths

parent 4a44f19e
......@@ -139,7 +139,7 @@ dd {
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script>
var peoplefinderApp = angular.module('peoplefinderApp', []);
var baseURL = window.location.protocol+"//"+window.location.host;
var baseURL = window.location.protocol+"//"+window.location.host + window.location.pathname;
peoplefinderApp.controller('QueryCtrl', function($scope, $http) {
$scope.results = [];
......@@ -152,7 +152,7 @@ dd {
$scope.nextPageNum = 1;
$scope.results = [];
}
$http.get($scope.query + "/" + $scope.nextPageNum).success(function(data) {
$http.get("" + window.location.pathname + $scope.query + "/" + $scope.nextPageNum).success(function(data) {
console.log(data);
console.log($scope.results);
$scope.results = $scope.results.concat(data.results); // = angular.extend({}, $scope.results, data.results);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment