Closes #117: fix templates minification

This commit is contained in:
Benjamin Gamard 2017-11-06 00:48:55 +01:00
parent cf9101d157
commit 4d161aea07
2 changed files with 10 additions and 12 deletions

View File

@ -72,12 +72,12 @@ module.exports = function(grunt) {
options: {
append: true,
htmlmin: {
collapseBooleanAttributes: true,
collapseBooleanAttributes: false,
collapseWhitespace: true,
removeAttributeQuotes: true,
removeAttributeQuotes: false,
removeComments: true,
removeEmptyAttributes: true,
removeRedundantAttributes: true,
removeEmptyAttributes: false,
removeRedundantAttributes: false,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
}
@ -90,12 +90,12 @@ module.exports = function(grunt) {
options: {
append: true,
htmlmin: {
collapseBooleanAttributes: true,
collapseBooleanAttributes: false,
collapseWhitespace: true,
removeAttributeQuotes: true,
removeAttributeQuotes: false,
removeComments: true,
removeEmptyAttributes: true,
removeRedundantAttributes: true,
removeEmptyAttributes: false,
removeRedundantAttributes: false,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
}

View File

@ -9,12 +9,10 @@ angular.module('docs').directive('file', function() {
template: '<input type="file" />',
replace: true,
require: 'ngModel',
link: function(scope, element, attr, ctrl) {
link: function(scope, element, attrs, ctrl) {
element.bind('change', function() {
scope.$apply(function() {
console.log('is multiple?', attr.multiple);
console.log('setting file directive value', attr.multiple ? element[0].files : element[0].files[0]);
attr.multiple ? ctrl.$setViewValue(element[0].files) : ctrl.$setViewValue(element[0].files[0]);
attrs.multiple ? ctrl.$setViewValue(element[0].files) : ctrl.$setViewValue(element[0].files[0]);
});
});
}