From 0623a4617dec89a232d3a4548a4e76c69433c8d2 Mon Sep 17 00:00:00 2001 From: jdat82 Date: Sat, 27 Feb 2016 10:33:10 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"feature/character-list=20&=20feature/?= =?UTF-8?q?comic-list=20=E2=80=94=20Less=20verbose=20writing=20for=20condi?= =?UTF-8?q?tionals=20attributes"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because less verbose in that case means also less readable et I think less performant. This reverts commit d8bd7186b073e6a956998dcd8522905ee50140e7. --- app/character/character-list.jade | 6 ++---- app/comic/comic-list.jade | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/character/character-list.jade b/app/character/character-list.jade index 4696539..8f3d457 100644 --- a/app/character/character-list.jade +++ b/app/character/character-list.jade @@ -9,10 +9,8 @@ ion-view.characters(view-title='Characters') .list .card.characters-card(ng-repeat="character in vm.characters track by character.id") .item.item-image(ui-sref='app.character-detail({character:character})') - div.characters-card__cover( - ng-class='{"characters-card__cover--not-found": !character.thumbnailUrl}' - ng-attr-img-cache='{{character.thumbnailUrl && true || undefined}}' - ng-attr-ic-bg='{{character.thumbnailUrl || undefined}}') + div.characters-card__cover(ng-if="character.thumbnailUrl" img-cache ic-bg="{{::character.thumbnailUrl}}") + div.characters-card__cover.characters-card__cover--not-found(ng-if="!character.thumbnailUrl") .item.item-icon-right.assertive.characters-card__footer i.icon.ion-android-favorite-outline(ng-click='vm.keep()') | {{::character.name}} diff --git a/app/comic/comic-list.jade b/app/comic/comic-list.jade index 1268cff..8aa7789 100644 --- a/app/comic/comic-list.jade +++ b/app/comic/comic-list.jade @@ -9,10 +9,8 @@ ion-view.comics(view-title='Comics') .list .card.comics-card(ng-repeat="comic in vm.comics track by comic.id") .item.item-image(ui-sref='app.comic-detail({comic:comic})') - div.comics-card__cover( - ng-class='{"comics-card__cover--not-found": !comic.thumbnailUrl}' - ng-attr-img-cache='{{comic.thumbnailUrl && true || undefined}}' - ng-attr-ic-bg='{{comic.thumbnailUrl || undefined}}') + div.comics-card__cover(ng-if="comic.thumbnailUrl" img-cache ic-bg="{{::comic.thumbnailUrl}}") + div.comics-card__cover.comics-card__cover--not-found(ng-if="!comic.thumbnailUrl") .item.item-icon-right.assertive.comics-card__footer i.icon.ion-android-favorite-outline(ng-click='vm.keep()') | {{::comic.title}}