fix(webpack): fix ng-include not loading templates with webpack

pull/2782/head
baron_l 2019-03-14 19:47:43 +01:00
parent 9e9843db9b
commit efd421bff8
3 changed files with 24 additions and 1 deletions

View File

@ -1,6 +1,11 @@
import _ from 'lodash-es';
import { AccessControlFormData } from '../../../../portainer/components/accessControlForm/porAccessControlFormModel';
require('./includes/update-restart.html')
require('./includes/secret.html')
require('./includes/config.html')
require('./includes/resources-placement.html')
angular.module('portainer.docker')
.controller('CreateServiceController', ['$q', '$scope', '$state', '$timeout', 'Service', 'ServiceHelper', 'ConfigService', 'ConfigHelper', 'SecretHelper', 'SecretService', 'VolumeService', 'NetworkService', 'ImageHelper', 'LabelHelper', 'Authentication', 'ResourceControlService', 'Notifications', 'FormValidator', 'PluginService', 'RegistryService', 'HttpRequestHelper', 'NodeService', 'SettingsService', 'WebhookService','EndpointProvider',
function ($q, $scope, $state, $timeout, Service, ServiceHelper, ConfigService, ConfigHelper, SecretHelper, SecretService, VolumeService, NetworkService, ImageHelper, LabelHelper, Authentication, ResourceControlService, Notifications, FormValidator, PluginService, RegistryService, HttpRequestHelper, NodeService, SettingsService, WebhookService,EndpointProvider) {

View File

@ -1,3 +1,21 @@
require('./includes/configs.html')
require('./includes/constraints.html')
require('./includes/container-specs.html')
require('./includes/containerlabels.html')
require('./includes/environmentvariables.html')
require('./includes/hosts.html')
require('./includes/logging.html')
require('./includes/mounts.html')
require('./includes/networks.html')
require('./includes/placementPreferences.html')
require('./includes/ports.html')
require('./includes/resources.html')
require('./includes/restart.html')
require('./includes/secrets.html')
require('./includes/servicelabels.html')
require('./includes/tasks.html')
require('./includes/updateconfig.html')
angular.module('portainer.docker')
.controller('ServiceController', ['$q', '$scope', '$transition$', '$state', '$location', '$timeout', '$anchorScroll', 'ServiceService', 'ConfigService', 'ConfigHelper', 'SecretService', 'ImageService', 'SecretHelper', 'Service', 'ServiceHelper', 'LabelHelper', 'TaskService', 'NodeService', 'ContainerService', 'TaskHelper', 'Notifications', 'ModalService', 'PluginService', 'Authentication', 'SettingsService', 'VolumeService', 'ImageHelper', 'WebhookService', 'EndpointProvider', 'clipboard','WebhookHelper',
function ($q, $scope, $transition$, $state, $location, $timeout, $anchorScroll, ServiceService, ConfigService, ConfigHelper, SecretService, ImageService, SecretHelper, Service, ServiceHelper, LabelHelper, TaskService, NodeService, ContainerService, TaskHelper, Notifications, ModalService, PluginService, Authentication, SettingsService, VolumeService, ImageHelper, WebhookService, EndpointProvider, clipboard, WebhookHelper) {

View File

@ -39,7 +39,7 @@ module.exports = {
{
loader: 'ngtemplate-loader',
options: {
relativeTo: projectRoot
relativeTo: projectRoot + '/'
}
},
{ loader: 'html-loader' }