Skip to content

Commit

Permalink
fix(slides): pass . Fixes #4855 and #4857
Browse files Browse the repository at this point in the history
  • Loading branch information
mlynch committed Dec 30, 2015
1 parent 0331d30 commit 13d0fbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 3 additions & 2 deletions js/angular/directive/slides.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ IonicModule
.directive('ionSlides', [
'$animate',
'$timeout',
function($animate, $timeout) {
'$compile',
function($animate, $timeout, $compile) {
return {
restrict: 'E',
transclude: true,
Expand Down Expand Up @@ -90,7 +91,7 @@ function($animate, $timeout) {
this._options = newOptions;

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

_this.__slider = slider;
$scope.slider = _this.__slider;
Expand Down
5 changes: 1 addition & 4 deletions js/views/slidesView.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/*===========================
Swiper
===========================*/
var Swiper = function (container, params) {
var Swiper = function (container, params, _scope, $compile) {

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

Expand Down Expand Up @@ -419,9 +419,6 @@
// Velocity
s.velocity = 0;

// Remove duplicated slides
var $compile = angular.element(s.wrapper).injector().get('$compile');

/*=========================
Locks, unlocks
===========================*/
Expand Down

0 comments on commit 13d0fbe

Please sign in to comment.