Skip to content

Commit 7078216

Browse files
feat(View): Allow targeting views on own state using viewname@. (normalizeUIViewTarget)
Closes #25
1 parent 92b34a1 commit 7078216

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/view/view.ts

+2
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ export class ViewService {
295295
if (relativeMatch.exec(uiViewContextAnchor)) {
296296
let anchor = uiViewContextAnchor.split(".").reduce(((anchor, x) => anchor.parent), context);
297297
uiViewContextAnchor = anchor.name;
298+
} else if (uiViewContextAnchor === '.') {
299+
uiViewContextAnchor = context.name;
298300
}
299301

300302
return {uiViewName, uiViewContextAnchor};

0 commit comments

Comments
 (0)