From 9629b6e8c671db40f2ef0a7fe66c069c6c25b507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-=C3=89tienne=20Lord?= <7397743+pelord@users.noreply.github.com> Date: Fri, 15 Oct 2021 10:51:39 -0400 Subject: [PATCH] =?UTF-8?q?fix(igoMatBadgeIcon):=20empty=20matBadge=20dire?= =?UTF-8?q?ctive=20cause=20icondirective=20to=E2=80=A6=20(#924)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(igoMatBadgeIcon): empty matBadge directive cause icondirective to crash --- packages/common/src/lib/badge-icon/badge-icon.directive.ts | 6 ++++++ .../catalog-browser/catalog-browser-layer.component.html | 2 +- .../layer/layer-list-tool/layer-list-tool.component.html | 2 +- .../search-results/search-results-add-button.component.html | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/common/src/lib/badge-icon/badge-icon.directive.ts b/packages/common/src/lib/badge-icon/badge-icon.directive.ts index 86fa025a26..d8090f5806 100644 --- a/packages/common/src/lib/badge-icon/badge-icon.directive.ts +++ b/packages/common/src/lib/badge-icon/badge-icon.directive.ts @@ -1,6 +1,12 @@ import { Directive, Input, ElementRef, OnInit } from '@angular/core'; import { MatIconRegistry } from '@angular/material/icon'; + +/** + * This directive allow to add an icon inside a matBadge. + * A value must be set into the matBadge directive ex: matBadge="icon". + * The badge content will be overrided by this current directive. + */ @Directive({ selector: '[igoMatBadgeIcon]' }) diff --git a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.html b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.html index 992ed633d2..7e45845859 100644 --- a/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.html +++ b/packages/geo/src/lib/catalog/catalog-browser/catalog-browser-layer.component.html @@ -27,7 +27,7 @@