diff --git a/src/generators/app/index.js b/src/generators/app/index.js index c1ce3c28a..fe914e588 100644 --- a/src/generators/app/index.js +++ b/src/generators/app/index.js @@ -547,7 +547,8 @@ export class Generator extends Base { ['ngRoute', 'angular-route'], ['uiBootstrap', 'angular-ui-bootstrap'], ['ngMessages', 'angular-messages'], - ['io', 'socket.io-client'] + ['io', 'socket.io-client'], + ['ngValidationMatch', 'angular-validation-match'] ]; function replacer(contents) { modulesToFix.forEach(([moduleName, importName]) => { diff --git a/templates/app/client/app/app.js b/templates/app/client/app/app.js index e86e3e4ff..40f47388a 100644 --- a/templates/app/client/app/app.js +++ b/templates/app/client/app/app.js @@ -4,7 +4,7 @@ import angular from 'angular'; import ngCookies from 'angular-cookies'; import ngResource from 'angular-resource'; import ngSanitize from 'angular-sanitize'; -import ngValidationMatch from 'angular-validation-match'; + <%_ if(filters.socketio) { _%> import 'angular-socket-io';<% } %> <%_ if(filters.ngroute) { _%> @@ -15,6 +15,7 @@ import uiRouter from 'angular-ui-router';<% } %> import uiBootstrap from 'angular-ui-bootstrap';<% } %> // import ngMessages from 'angular-messages'; <%_ if(filters.auth) { _%> +import ngValidationMatch from 'angular-validation-match'; <% } %> @@ -39,7 +40,6 @@ angular.module('<%= scriptAppName %>', [ ngCookies, ngResource, ngSanitize, - 'validation.match', <%_ if(filters.socketio) { %> 'btford.socket-io',<% } %> <%_ if(filters.ngroute) { %> @@ -51,7 +51,9 @@ angular.module('<%= scriptAppName %>', [ <%_ if(filters.auth) { %> _Auth, account, - admin,<% } _%> + admin, + 'validation.match', + <% } _%> navbar, footer, main,