Skip to content

Commit

Permalink
Fix: carousel on init too soon
Browse files Browse the repository at this point in the history
  • Loading branch information
mihnsen committed Apr 5, 2017
1 parent 100ab0b commit 93cf8a4
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-ui-carousel",
"version": "0.1.6",
"version": "0.1.7",
"authors": [
{
"name": "mihnsen",
Expand Down Expand Up @@ -36,7 +36,7 @@
"dependencies": {},
"devDependencies": {
"angular-mocks": ">=1.2.0",
"angular": "1.4",
"angular": "1.6",
"angular-sanitize": ">=1.2.0",
"prism": "^1.5.1"
},
Expand Down
10 changes: 5 additions & 5 deletions dist/ui-carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ angular.module('ui.carousel.controllers').controller('CarouselController', ['$sc
_this.initRanges();
_this.setProps();
_this.setupInfinite();

// onInit callback
if (_this.onInit) {
_this.onInit();
}
};

/**
Expand Down Expand Up @@ -168,6 +163,11 @@ angular.module('ui.carousel.controllers').controller('CarouselController', ['$sc
if (!_this.options.fade) {
_this.refreshTrackStyle();
}

// onInit callback
if (_this.onInit) {
_this.onInit();
}
}).catch(function () {
// Catch err
});
Expand Down
2 changes: 1 addition & 1 deletion dist/ui-carousel.min.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-ui-carousel",
"version": "0.1.6",
"version": "0.1.7",
"author": {
"name": "mihnsen",
"email": "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion src/demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ app.controller('CarouselDemoCtrl', ['$scope', 'Carousel', function($scope, Carou
'use strict';

this.singleInit = () => {
// console.log('single init');
console.log('single init');
};

this.single = {
Expand Down
10 changes: 5 additions & 5 deletions src/ui-carousel/controllers/carousel.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ angular.module('ui.carousel.controllers')
this.initRanges();
this.setProps();
this.setupInfinite();

// onInit callback
if (this.onInit) {
this.onInit();
}
};

/**
Expand Down Expand Up @@ -152,6 +147,11 @@ angular.module('ui.carousel.controllers')
if (!this.options.fade) {
this.refreshTrackStyle();
}

// onInit callback
if (this.onInit) {
this.onInit();
}
})
.catch(() => {
// Catch err
Expand Down

0 comments on commit 93cf8a4

Please sign in to comment.