Skip to content

Commit 3aee938

Browse files
committed
fix: use component selector as default
fixes #123
1 parent dbc371a commit 3aee938

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libs/dialog/src/lib/dialog.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
inject,
77
Injectable,
88
Injector,
9+
reflectComponentType,
910
TemplateRef,
1011
Type,
1112
ViewRef,
@@ -60,7 +61,7 @@ export class DialogService {
6061
const mergedConfig = this.mergeConfig(config);
6162

6263
if (isComponent(componentOrTemplate)) {
63-
mergedConfig.id ??= componentOrTemplate.name;
64+
mergedConfig.id ??= reflectComponentType(componentOrTemplate)?.selector;
6465
}
6566

6667
if (this.isOpen(mergedConfig.id)) {

0 commit comments

Comments
 (0)