From aebaf2ff740aa6d09007cde66cb76e9afa429506 Mon Sep 17 00:00:00 2001
From: Cameron Behar <0x24a537r9@gmail.com>
Date: Sun, 21 Feb 2016 02:13:16 -0800
Subject: [PATCH] fix(core): Remove the tag.
---
.../client/config/articles.client.routes.js | 4 ++--
.../services/articles.client.service.js | 2 +-
.../client/articles.client.routes.tests.js | 6 ++---
.../list-articles.client.controller.tests.js | 2 +-
.../chat/client/config/chat.client.routes.js | 2 +-
.../chat/client/views/chat.client.view.html | 2 +-
modules/core/client/app/init.js | 5 +++-
.../core/client/config/core.client.routes.js | 8 +++----
.../core/client/views/header.client.view.html | 2 +-
.../core/client/views/home.client.view.html | 2 +-
.../core/server/views/layout.server.view.html | 7 +++---
.../config/users-admin.client.routes.js | 6 ++---
.../client/config/users.client.routes.js | 24 +++++++++----------
...hange-profile-picture.client.controller.js | 2 +-
.../client/services/users.client.service.js | 4 ++--
15 files changed, 40 insertions(+), 38 deletions(-)
diff --git a/modules/articles/client/config/articles.client.routes.js b/modules/articles/client/config/articles.client.routes.js
index a16926e520..4a94fa2e88 100644
--- a/modules/articles/client/config/articles.client.routes.js
+++ b/modules/articles/client/config/articles.client.routes.js
@@ -16,7 +16,7 @@
})
.state('articles.list', {
url: '',
- templateUrl: 'modules/articles/client/views/list-articles.client.view.html',
+ templateUrl: '/modules/articles/client/views/list-articles.client.view.html',
controller: 'ArticlesListController',
controllerAs: 'vm',
data: {
@@ -25,7 +25,7 @@
})
.state('articles.view', {
url: '/:articleId',
- templateUrl: 'modules/articles/client/views/view-article.client.view.html',
+ templateUrl: '/modules/articles/client/views/view-article.client.view.html',
controller: 'ArticlesController',
controllerAs: 'vm',
resolve: {
diff --git a/modules/articles/client/services/articles.client.service.js b/modules/articles/client/services/articles.client.service.js
index 19b8015d5c..5e653ca4be 100644
--- a/modules/articles/client/services/articles.client.service.js
+++ b/modules/articles/client/services/articles.client.service.js
@@ -8,7 +8,7 @@
ArticlesService.$inject = ['$resource', '$log'];
function ArticlesService($resource, $log) {
- var Article = $resource('api/articles/:articleId', {
+ var Article = $resource('/api/articles/:articleId', {
articleId: '@_id'
}, {
update: {
diff --git a/modules/articles/tests/client/articles.client.routes.tests.js b/modules/articles/tests/client/articles.client.routes.tests.js
index 650223d80c..4fa7cae1e2 100644
--- a/modules/articles/tests/client/articles.client.routes.tests.js
+++ b/modules/articles/tests/client/articles.client.routes.tests.js
@@ -64,7 +64,7 @@
beforeEach(inject(function ($controller, $state, $templateCache) {
viewstate = $state.get('articles.view');
- $templateCache.put('modules/articles/client/views/view-article.client.view.html', '');
+ $templateCache.put('/modules/articles/client/views/view-article.client.view.html', '');
// create mock article
mockArticle = new ArticlesService({
@@ -104,7 +104,7 @@
});
it('Should have templateUrl', function () {
- expect(viewstate.templateUrl).toBe('modules/articles/client/views/view-article.client.view.html');
+ expect(viewstate.templateUrl).toBe('/modules/articles/client/views/view-article.client.view.html');
});
});
@@ -119,7 +119,7 @@
$rootScope.$digest();
expect($location.path()).toBe('/articles');
- expect($state.current.templateUrl).toBe('modules/articles/client/views/list-articles.client.view.html');
+ expect($state.current.templateUrl).toBe('/modules/articles/client/views/list-articles.client.view.html');
}));
});
});
diff --git a/modules/articles/tests/client/list-articles.client.controller.tests.js b/modules/articles/tests/client/list-articles.client.controller.tests.js
index ee654f4707..248862298d 100644
--- a/modules/articles/tests/client/list-articles.client.controller.tests.js
+++ b/modules/articles/tests/client/list-articles.client.controller.tests.js
@@ -76,7 +76,7 @@
it('should send a GET request and return all articles', inject(function (ArticlesService) {
// Set POST response
- $httpBackend.expectGET('api/articles').respond(mockArticleList);
+ $httpBackend.expectGET('/api/articles').respond(mockArticleList);
$httpBackend.flush();
diff --git a/modules/chat/client/config/chat.client.routes.js b/modules/chat/client/config/chat.client.routes.js
index 4ec07d8bc9..f69aff6108 100644
--- a/modules/chat/client/config/chat.client.routes.js
+++ b/modules/chat/client/config/chat.client.routes.js
@@ -11,7 +11,7 @@
$stateProvider
.state('chat', {
url: '/chat',
- templateUrl: 'modules/chat/client/views/chat.client.view.html',
+ templateUrl: '/modules/chat/client/views/chat.client.view.html',
controller: 'ChatController',
controllerAs: 'vm',
data: {
diff --git a/modules/chat/client/views/chat.client.view.html b/modules/chat/client/views/chat.client.view.html
index 3b9174c6ed..ad45efa5cd 100644
--- a/modules/chat/client/views/chat.client.view.html
+++ b/modules/chat/client/views/chat.client.view.html
@@ -18,7 +18,7 @@
Chat Example
-
+
diff --git a/modules/core/client/app/init.js b/modules/core/client/app/init.js
index 4b99c46d12..8ffaef33bc 100644
--- a/modules/core/client/app/init.js
+++ b/modules/core/client/app/init.js
@@ -13,7 +13,10 @@
bootstrapConfig.$inject = ['$compileProvider', '$locationProvider', '$httpProvider', '$logProvider'];
function bootstrapConfig($compileProvider, $locationProvider, $httpProvider, $logProvider) {
- $locationProvider.html5Mode(true).hashPrefix('!');
+ $locationProvider.html5Mode({
+ enabled: true,
+ requireBase: false
+ }).hashPrefix('!');
$httpProvider.interceptors.push('authInterceptor');
diff --git a/modules/core/client/config/core.client.routes.js b/modules/core/client/config/core.client.routes.js
index 9a89d6c326..c00f8807e0 100644
--- a/modules/core/client/config/core.client.routes.js
+++ b/modules/core/client/config/core.client.routes.js
@@ -29,13 +29,13 @@
$stateProvider
.state('home', {
url: '/',
- templateUrl: 'modules/core/client/views/home.client.view.html',
+ templateUrl: '/modules/core/client/views/home.client.view.html',
controller: 'HomeController',
controllerAs: 'vm'
})
.state('not-found', {
url: '/not-found',
- templateUrl: 'modules/core/client/views/404.client.view.html',
+ templateUrl: '/modules/core/client/views/404.client.view.html',
controller: 'ErrorController',
controllerAs: 'vm',
params: {
@@ -50,7 +50,7 @@
})
.state('bad-request', {
url: '/bad-request',
- templateUrl: 'modules/core/client/views/400.client.view.html',
+ templateUrl: '/modules/core/client/views/400.client.view.html',
controller: 'ErrorController',
controllerAs: 'vm',
params: {
@@ -65,7 +65,7 @@
})
.state('forbidden', {
url: '/forbidden',
- templateUrl: 'modules/core/client/views/403.client.view.html',
+ templateUrl: '/modules/core/client/views/403.client.view.html',
data: {
ignoreState: true,
pageTitle: 'Forbidden'
diff --git a/modules/core/client/views/header.client.view.html b/modules/core/client/views/header.client.view.html
index c09e9770a8..d35f961dc5 100644
--- a/modules/core/client/views/header.client.view.html
+++ b/modules/core/client/views/header.client.view.html
@@ -32,7 +32,7 @@