Додані повідомлення та перепрацьована структура застосунку та api
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<div class="page-schedule-constructor">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -3,6 +3,12 @@ const Schedule_constructor = {
|
||||
let html = await fetch('/lib/pages/schedule/constructor/index.html').then((response) => response.text());
|
||||
app.innerHTML = html;
|
||||
|
||||
|
||||
const newItem = document.createElement('nav-item');
|
||||
const uniqueId = `nav-dynamic-${Date.now()}`;
|
||||
newItem.setAttribute('id', uniqueId);
|
||||
newItem.setAttribute('title', 'Динамічний Пункт');
|
||||
newItem.setAttribute('icon', '/img/0.svg');
|
||||
newItem.setAttribute('click', `alert('${uniqueId} clicked!')`);
|
||||
document.querySelector('navigation-container').appendChild(newItem);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user