У меня есть код ниже, используя угловое пятно. fevt продолжает сменять салфетки поверх первой карусели.угловое пятно transclude не работает в динамическом ng-повторении
<slick slides-to-scroll="1" arrows="false" current-index="slick.current" class="first-slide" on-after-change="slick.onAfterChange(this)">
<div ng-repeat="s in evt">
</div>
</slick>
<slick slides-to-scroll="{{numtoslide}}" init-onload=true data="fevt" arrows="false" variable-width="true" center-padding="60px" center-mode="false">
<div ng-repeat="t in fevt" ng-if="t.section != 'venues'" style="width:320px;margin-right:5px;" >
</div>
</slick>
about.js
$scope.slick = { current:0, init : function(){}, goto : function(index) {this.current = index}, next : function(index){return this.current++}, prev : function(index){this.current--}, onBeforeChange : function(){}, onAfterChange : function(){} }
$scope.slick.onAfterChange = function(e){
$scope.fevt = [];
for(var j=0; j< $localStorage.eventlist[0].items.length; j++){
if($localStorage.eventlist[0].items[j].related_venue == $scope.test){
$scope.fevt.push($localStorage.eventlist[0].items[j]);
}
}
$scope.$apply();
}
slick.js
if (scope.initOnload) {
isInitialized = false;
return scope.$watch('data', function (newVal, oldVal) {
if (newVal != null) {
return $transclude(function (clone, scope) {
var compiled;
if (isInitialized) {
destroySlick();
}
compiled = $compile(clone)(scope);
element.append(compiled);
initializeSlick();
return isInitialized = true;
});
}else{
isInitialized = false;
initializeSlick();
}
});
} else {
return $transclude(function (clone, scope) {
var compiled;
compiled = $compile(clone)(scope);
element.append(compiled);
return initializeSlick();
});
}
Когда над салфеткой с afterchange случае есть newval обнаружено, но secound карусельного обновления оленьей кожи на основе нового массива
Любая помощь оценили Спасибо
Любая помощь застряла в течение 3 дней – shrijan