Skip to content

Commit

Permalink
feat: add template
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Dec 4, 2024
1 parent aed5cc6 commit 75c4894
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
@if (inNav) {
<li class="visually-hidden-focusable">
<it-link [href]="href" [externalLink]="externalLink">
<ng-content></ng-content>
<ng-container *ngTemplateOutlet="linkContent"></ng-container>
</it-link>
</li>
} @else {
<it-link class="visually-hidden-focusable" [href]="href" [externalLink]="externalLink">
<ng-content></ng-content>
<ng-container *ngTemplateOutlet="linkContent"></ng-container>
</it-link>
}

<ng-template #linkContent>
<ng-content></ng-content>
</ng-template>
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
@if (nav) {
<nav class="skiplinks">
<ul>
<ng-content></ng-content>
<ng-container *ngTemplateOutlet="linkContent"></ng-container>
</ul>
</nav>
} @else {
<div class="skiplinks">
<ng-content></ng-content>
<ng-container *ngTemplateOutlet="linkContent"></ng-container>
</div>
}

<ng-template #linkContent>
<ng-content></ng-content>
</ng-template>

0 comments on commit 75c4894

Please sign in to comment.