Skip to content

Commit ee61530

Browse files
committed
Release v2.6.1
1 parent 16abdcc commit ee61530

File tree

6 files changed

+20
-8
lines changed

6 files changed

+20
-8
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ng-flow",
3-
"version": "2.6.0",
3+
"version": "2.6.1",
44
"ignore": [
55
"**/.*",
66
"test",

dist/ng-flow-standalone.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ angular.module('flow.init', ['flow.provider'])
16311631
// use existing flow object or create a new one
16321632
var flow = $scope.$eval($attrs.flowObject) || flowFactory.create(options);
16331633

1634-
flow.on('catchAll', function (eventName) {
1634+
var catchAllHandler = function(eventName){
16351635
var args = Array.prototype.slice.call(arguments);
16361636
args.shift();
16371637
var event = $scope.$broadcast.apply($scope, ['flow::' + eventName, flow].concat(args));
@@ -1643,9 +1643,15 @@ angular.module('flow.init', ['flow.provider'])
16431643
if (event.defaultPrevented) {
16441644
return false;
16451645
}
1646+
};
1647+
1648+
flow.on('catchAll', catchAllHandler);
1649+
$scope.$on('$destroy', function(){
1650+
flow.off('catchAll', catchAllHandler);
16461651
});
16471652

16481653
$scope.$flow = flow;
1654+
16491655
if ($attrs.hasOwnProperty('flowName')) {
16501656
$parse($attrs.flowName).assign($scope, flow);
16511657
$scope.$on('$destroy', function () {

dist/ng-flow-standalone.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ng-flow.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ angular.module('flow.init', ['flow.provider'])
6969
// use existing flow object or create a new one
7070
var flow = $scope.$eval($attrs.flowObject) || flowFactory.create(options);
7171

72-
flow.on('catchAll', function (eventName) {
72+
var catchAllHandler = function(eventName){
7373
var args = Array.prototype.slice.call(arguments);
7474
args.shift();
7575
var event = $scope.$broadcast.apply($scope, ['flow::' + eventName, flow].concat(args));
@@ -81,9 +81,15 @@ angular.module('flow.init', ['flow.provider'])
8181
if (event.defaultPrevented) {
8282
return false;
8383
}
84+
};
85+
86+
flow.on('catchAll', catchAllHandler);
87+
$scope.$on('$destroy', function(){
88+
flow.off('catchAll', catchAllHandler);
8489
});
8590

8691
$scope.$flow = flow;
92+
8793
if ($attrs.hasOwnProperty('flowName')) {
8894
$parse($attrs.flowName).assign($scope, flow);
8995
$scope.$on('$destroy', function () {

dist/ng-flow.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ng-flow",
3-
"version": "2.6.0",
3+
"version": "2.6.1",
44
"description": "Flow.js html5 file upload extension on angular.js framework",
55
"scripts": {
66
"test": "grunt test"

0 commit comments

Comments
 (0)