nav Element wird nun gerendert
This commit is contained in:
1 parent
696d14bd39
commit
6d2c39c69b
1 file changed
+15
@@ -37,4 +37,19 @@ export class ShoppingList {
|
||||
|
||||
return li;
|
||||
}
|
||||
|
||||
renderNavElement() {
|
||||
const li = document.createElement("li");
|
||||
const a = document.createElement("a");
|
||||
|
||||
li.classList.add("navbar__list");
|
||||
li.dataset.id = this.listID;
|
||||
|
||||
a.setAttribute("href", `/list/${this.listID}`);
|
||||
a.textContent = this.listName;
|
||||
|
||||
li.append(a);
|
||||
|
||||
return li;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user