Skip to content

Commit 13d0fbe

Browse files
committedDec 30, 2015
fix(slides): pass . Fixes #4855 and #4857
1 parent 0331d30 commit 13d0fbe

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed
 

‎js/angular/directive/slides.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ IonicModule
3636
.directive('ionSlides', [
3737
'$animate',
3838
'$timeout',
39-
function($animate, $timeout) {
39+
'$compile',
40+
function($animate, $timeout, $compile) {
4041
return {
4142
restrict: 'E',
4243
transclude: true,
@@ -90,7 +91,7 @@ function($animate, $timeout) {
9091
this._options = newOptions;
9192

9293
$timeout(function() {
93-
var slider = new ionic.views.Swiper($element.children()[0], newOptions, $scope);
94+
var slider = new ionic.views.Swiper($element.children()[0], newOptions, $scope, $compile);
9495

9596
_this.__slider = slider;
9697
$scope.slider = _this.__slider;

‎js/views/slidesView.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/*===========================
2121
Swiper
2222
===========================*/
23-
var Swiper = function (container, params) {
23+
var Swiper = function (container, params, _scope, $compile) {
2424

2525
if (!(this instanceof Swiper)) return new Swiper(container, params);
2626

@@ -419,9 +419,6 @@
419419
// Velocity
420420
s.velocity = 0;
421421

422-
// Remove duplicated slides
423-
var $compile = angular.element(s.wrapper).injector().get('$compile');
424-
425422
/*=========================
426423
Locks, unlocks
427424
===========================*/

0 commit comments

Comments
 (0)
Please sign in to comment.