Started to add text
This commit is contained in:
@@ -76,6 +76,18 @@ class HomeworkPage extends HomeworkElement {
|
|||||||
const row = new HomeworkVocabularyTask(crypto.randomUUID())
|
const row = new HomeworkVocabularyTask(crypto.randomUUID())
|
||||||
this.content.append(row)
|
this.content.append(row)
|
||||||
}
|
}
|
||||||
|
this.loadAndPopulateData()
|
||||||
|
}
|
||||||
|
|
||||||
|
async loadAndPopulateData() {
|
||||||
|
const dataFile = "/resources/homework.json"
|
||||||
|
const response = await fetch(dataFile)
|
||||||
|
const data = await response.json()
|
||||||
|
data.items.forEach((item) => {
|
||||||
|
const row = new HomeworkVocabularyTask(crypto.randomUUID())
|
||||||
|
this.content.append(row)
|
||||||
|
})
|
||||||
|
console.log(data.items)
|
||||||
}
|
}
|
||||||
|
|
||||||
newVocabulary() {
|
newVocabulary() {
|
||||||
|
|||||||
Reference in New Issue
Block a user