Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion dist/angular-bootstrap-switch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* angular-bootstrap-switch
* @version v0.5.2 - 2017-04-19
* @version v0.5.2 - 2017-05-12
* @author Francesco Pontillo (francescopontillo@gmail.com)
* @link https://github.com/frapontillo/angular-bootstrap-switch
* @license Apache License 2.0(http://www.apache.org/licenses/LICENSE-2.0.html)
Expand Down Expand Up @@ -163,6 +163,12 @@ angular.module('frapontillo.bootstrap-switch')
controller.$setViewValue(controller.$modelValue);
} else {
controller.$setViewValue(viewValue);
controller.$formatters[0] = function(value) {
if (value === undefined || value === null) {
return value;
}
return angular.equals(value, getTrueValue());
};
}
}
};
Expand Down Expand Up @@ -285,5 +291,7 @@ angular.module('frapontillo.bootstrap-switch')
};
});

module.exports = 'frapontillo.bootstrap-switch';

// Source: bsSwitch.suffix
})();
4 changes: 2 additions & 2 deletions dist/angular-bootstrap-switch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/directives/bsSwitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,5 @@ angular.module('frapontillo.bootstrap-switch')
replace: true
};
});

module.exports = 'frapontillo.bootstrap-switch';