Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit aebaf2f

Browse files
0x24a537r9mleanos
authored andcommitted
fix(core): Remove the <base> tag.
1 parent 0ea8cec commit aebaf2f

15 files changed

+40
-38
lines changed

modules/articles/client/config/articles.client.routes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
})
1717
.state('articles.list', {
1818
url: '',
19-
templateUrl: 'modules/articles/client/views/list-articles.client.view.html',
19+
templateUrl: '/modules/articles/client/views/list-articles.client.view.html',
2020
controller: 'ArticlesListController',
2121
controllerAs: 'vm',
2222
data: {
@@ -25,7 +25,7 @@
2525
})
2626
.state('articles.view', {
2727
url: '/:articleId',
28-
templateUrl: 'modules/articles/client/views/view-article.client.view.html',
28+
templateUrl: '/modules/articles/client/views/view-article.client.view.html',
2929
controller: 'ArticlesController',
3030
controllerAs: 'vm',
3131
resolve: {

modules/articles/client/services/articles.client.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
ArticlesService.$inject = ['$resource', '$log'];
99

1010
function ArticlesService($resource, $log) {
11-
var Article = $resource('api/articles/:articleId', {
11+
var Article = $resource('/api/articles/:articleId', {
1212
articleId: '@_id'
1313
}, {
1414
update: {

modules/articles/tests/client/articles.client.routes.tests.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
beforeEach(inject(function ($controller, $state, $templateCache) {
6666
viewstate = $state.get('articles.view');
67-
$templateCache.put('modules/articles/client/views/view-article.client.view.html', '');
67+
$templateCache.put('/modules/articles/client/views/view-article.client.view.html', '');
6868

6969
// create mock article
7070
mockArticle = new ArticlesService({
@@ -104,7 +104,7 @@
104104
});
105105

106106
it('Should have templateUrl', function () {
107-
expect(viewstate.templateUrl).toBe('modules/articles/client/views/view-article.client.view.html');
107+
expect(viewstate.templateUrl).toBe('/modules/articles/client/views/view-article.client.view.html');
108108
});
109109
});
110110

@@ -119,7 +119,7 @@
119119
$rootScope.$digest();
120120

121121
expect($location.path()).toBe('/articles');
122-
expect($state.current.templateUrl).toBe('modules/articles/client/views/list-articles.client.view.html');
122+
expect($state.current.templateUrl).toBe('/modules/articles/client/views/list-articles.client.view.html');
123123
}));
124124
});
125125
});

modules/articles/tests/client/list-articles.client.controller.tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676

7777
it('should send a GET request and return all articles', inject(function (ArticlesService) {
7878
// Set POST response
79-
$httpBackend.expectGET('api/articles').respond(mockArticleList);
79+
$httpBackend.expectGET('/api/articles').respond(mockArticleList);
8080

8181

8282
$httpBackend.flush();

modules/chat/client/config/chat.client.routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$stateProvider
1212
.state('chat', {
1313
url: '/chat',
14-
templateUrl: 'modules/chat/client/views/chat.client.view.html',
14+
templateUrl: '/modules/chat/client/views/chat.client.view.html',
1515
controller: 'ChatController',
1616
controllerAs: 'vm',
1717
data: {

modules/chat/client/views/chat.client.view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ <h1>Chat Example</h1>
1818
<!-- List all messages -->
1919
<li class="col-xs-12 col-md-offset-4 col-md-4 chat-message" ng-repeat="message in vm.messages">
2020
<small class="pull-right text-muted" ng-bind="message.created | date:'mediumTime'"></small>
21-
<img ng-src="{{message.profileImageURL}}" alt="{{message.username}}" class="pull-left chat-profile-image" />
21+
<img ng-src="/{{message.profileImageURL}}" alt="{{message.username}}" class="pull-left chat-profile-image" />
2222
<div class="pull-left chat-message-details">
2323
<strong ng-bind="message.username"></strong>
2424
<br>

modules/core/client/app/init.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
bootstrapConfig.$inject = ['$compileProvider', '$locationProvider', '$httpProvider', '$logProvider'];
1414

1515
function bootstrapConfig($compileProvider, $locationProvider, $httpProvider, $logProvider) {
16-
$locationProvider.html5Mode(true).hashPrefix('!');
16+
$locationProvider.html5Mode({
17+
enabled: true,
18+
requireBase: false
19+
}).hashPrefix('!');
1720

1821
$httpProvider.interceptors.push('authInterceptor');
1922

modules/core/client/config/core.client.routes.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
$stateProvider
3030
.state('home', {
3131
url: '/',
32-
templateUrl: 'modules/core/client/views/home.client.view.html',
32+
templateUrl: '/modules/core/client/views/home.client.view.html',
3333
controller: 'HomeController',
3434
controllerAs: 'vm'
3535
})
3636
.state('not-found', {
3737
url: '/not-found',
38-
templateUrl: 'modules/core/client/views/404.client.view.html',
38+
templateUrl: '/modules/core/client/views/404.client.view.html',
3939
controller: 'ErrorController',
4040
controllerAs: 'vm',
4141
params: {
@@ -50,7 +50,7 @@
5050
})
5151
.state('bad-request', {
5252
url: '/bad-request',
53-
templateUrl: 'modules/core/client/views/400.client.view.html',
53+
templateUrl: '/modules/core/client/views/400.client.view.html',
5454
controller: 'ErrorController',
5555
controllerAs: 'vm',
5656
params: {
@@ -65,7 +65,7 @@
6565
})
6666
.state('forbidden', {
6767
url: '/forbidden',
68-
templateUrl: 'modules/core/client/views/403.client.view.html',
68+
templateUrl: '/modules/core/client/views/403.client.view.html',
6969
data: {
7070
ignoreState: true,
7171
pageTitle: 'Forbidden'

modules/core/client/views/header.client.view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<ul class="nav navbar-nav navbar-right" ng-show="vm.authentication.user">
3333
<li class="dropdown" uib-dropdown>
3434
<a class="dropdown-toggle user-header-dropdown-toggle" uib-dropdown-toggle role="button">
35-
<img ng-src="{{vm.authentication.user.profileImageURL}}" alt="{{vm.authentication.user.displayName}}" class="header-profile-image" />
35+
<img ng-src="/{{vm.authentication.user.profileImageURL}}" alt="{{vm.authentication.user.displayName}}" class="header-profile-image" />
3636
<span ng-bind="vm.authentication.user.displayName"></span> <b class="caret"></b>
3737
</a>
3838
<ul class="dropdown-menu" role="menu">

modules/core/client/views/home.client.view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="jumbotron text-center">
33
<div class="row">
44
<div class="col-md-6 col-md-offset-3 col-sm-6 col-sm-offset-3 col-xs-12">
5-
<img alt="MEAN.JS" class="img-responsive text-center" src="modules/core/client/img/brand/logo.png" />
5+
<img alt="MEAN.JS" class="img-responsive text-center" src="/modules/core/client/img/brand/logo.png" />
66
</div>
77
</div>
88
<br>

0 commit comments

Comments
 (0)