Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Lagerverwaltung
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
Lagerverwaltung
Commits
3376f844
Verified
Commit
3376f844
authored
3 years ago
by
Jonas Leder
Browse files
Options
Downloads
Patches
Plain Diff
implement active page highlighting
parent
a9eeff6b
Branches
Branches containing commit
No related tags found
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/app.component.html
+3
-4
3 additions, 4 deletions
src/app/app.component.html
src/app/app.component.ts
+12
-2
12 additions, 2 deletions
src/app/app.component.ts
with
15 additions
and
6 deletions
src/app/app.component.html
+
3
−
4
View file @
3376f844
...
...
@@ -3,8 +3,7 @@
</mat-toolbar>
<nav
mat-tab-nav-bar
mat-stretch-tabs
>
<a
mat-tab-link
*ngFor=
"let link of links; index as i"
[href]=
"link"
(click)=
"activeLink = link"
[active]=
"activeLink == link"
>
{{titles[i]}}
</a>
</nav>
[href]=
"link"
[active]=
"activeLink == link"
>
{{titles[i]}}
</a>
</nav>
<router-outlet></router-outlet>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/app/app.component.ts
+
12
−
2
View file @
3376f844
import
{
Component
}
from
'
@angular/core
'
;
import
{
Router
,
ActivatedRoute
}
from
'
@angular/router
'
;
@
Component
({
selector
:
'
app-root
'
,
templateUrl
:
'
./app.component.html
'
,
styleUrls
:
[
'
./app.component.scss
'
]
})
export
class
AppComponent
{
constructor
(
public
router
:
Router
,
public
route
:
ActivatedRoute
)
{}
activeLink
=
""
;
links
=
[
'
#/bestand
'
,
'
#/buchung
'
,
'
#/neu
'
];
titles
=
[
'
Bestand
'
,
'
Buchung
'
,
'
Neu
'
];
activeLink
=
this
.
links
[
1
];
title
=
'
Lagerverwaltung
'
;
ngOnInit
(){
console
.
log
(
this
.
router
.
url
);
this
.
router
.
events
.
subscribe
((
url
:
any
)
=>
{
if
(
url
.
url
!=
undefined
)
{
this
.
activeLink
=
"
#
"
+
url
.
url
}
});
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment