Performance Problem (Transition)


#1

Hi all,

I meet some problem with one of my view and the different transition when i move on it.
I have the feeling that when i add some style like i did ( Watch my directive above ) on my directive the transition is really slow. What i don’t get is that i use the differents components that the framework Provide.

Globally my app respond pretty good but with this view i got some probs. If any one could give me some advice i’ll take it. any advice is welcome :wink: Thanks !

My View :

< div collection-item-width="‘100%’" collection-item-height=“300” collection-repeat=“d in data” style=“width:100%;”>
< a ng-click=“detailData(d.uuid)” >
< data-thumb data=“d” >
< /a>
< /div>

My directive ‘dataThumb’ :

.directive(‘dataThumb’, function() {
return {
restrict: ‘E’,
scope : {
data: ‘=’,
},
template : ‘< div class=“list card”>’ +
’< div class=“item item-body” >’ +
’< img ng-src="{{ data.snapshot.thumb }}" style=“max-width:100%;height:140px;margin: 0 auto;”/>’+
’< h2>{{ data.title }}’ +
’< p>{{ data.date_created }}< /p>’ +
’< /div>’ +
’< div class=“item tabs tabs-secondary tabs-icon-left”>’ +
’< a class=“tab-item”>’ +
’< i class=“icon ion-email”>’ +
‘Share’ +
’< /a>’ +
’< a class="tab-item"g>’ +
‘Available Offline ’ +
’< i class=“icon ion-toggle”>’ +
’< /a>’ +
’< /div>’ +
’< /div>’
};
})

In my controller :

$scope.data = [];
dataService.retrievePres()
  .then(function(data){
  $scope.data = data.data.feed;
});
//Some other function which react with some Ngclick.

My service :

factory(‘dataService’, [’$http’, ‘$q’, ‘ENV’, function($http, $q){
var result = {};

result.retrievePres = function(){
var deferred = $q.defer();
return $http.get( adressApi + ‘endPoint’, { cache : true, params :{ Some params } } )
.success(function (data) {
deferred.resolve(data);
})
.error(function(error){
deferred.reject();
});
return deferred.promise;
};