приношу свои извинения, если это размещено не в том месте. Я работаю над проектом Yo и понимаю, что здесь можно просмотреть свой код. хоть убей, модификации js dom не появляются! пожалуйста, может кто-нибудь взглянуть !? ive замаскировал данные, чтобы скрыть личные апики. Я бегаю глотком. получил большое спасибо
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Dashboard</title>
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
<!-- build:css styles/vendor.css -->
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.min.css" type="text/css" />
<!-- endbuild -->
<!-- build:css styles/main.css -->
<link rel="stylesheet" href="styles/main.css">
<!-- endbuild -->
<!-- build:js scripts/modernizr.js -->
<script src="scripts/modernizr.js"></script>
<!-- endbuild -->
</head>
<body>
<div class="jumbotron">
<h1 class="display-3">'Allo, 'Allo!</h1>
<p class="lead">
<ul id="text"></ul>
<p><a class="btn btn-lg btn-success" href="#">Splendid!</a></p>
</div>
<div class="footer">
<!-- build:js scripts/vendor.js -->
<script type="text/javascript" src="/node_modules/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="/node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- endbuild -->
<!-- build:js scripts/main.js -->
<script src="scripts/main.js"></script>
<!-- endbuild -->
"use strict";
console.log(''Allo 'Allo!');
function createNode(element) {
return document.createElement(element);
}
function append(parent, el) {
return parent.appendChild(el);
}
const ul = document.getElementById('text');
const url = "https://api.abc.com;
fetch(url)
.then((resp) => resp.json())
.then(function(data) {
let info = data.results;
return info.map(function(stuff) {
let li = createNode('li');
let span = createNode('span');
span.innerHTML = `${stuff.name} ${stuff.price}`;
append(li, span);
append(ul, li);
})
})
.catch(function(error) {
console.log(error);
});
// Uncomment to enable Bootstrap tooltips
// https://getbootstrap.com/docs/4.0/components/tooltips/#example-enable-tooltips-everywhere
// $(function () { $('[data-toggle="tooltip"]').tooltip(); });
// Uncomment to enable Bootstrap popovers
// https://getbootstrap.com/docs/4.0/components/popovers/#example-enable-popovers-everywhere
// $(function () { $('[data-toggle="popover"]').popover(); });
//# sourceMappingURL=main.js.map
console.log(''Allo 'Allo!');
function createNode(element) {
return document.createElement(element);
}
function append(parent, el) {
return parent.appendChild(el);
}
const ul = document.getElementById('text');
const url = "https://api.abc.com;
fetch(url)
.then((resp) => resp.json())
.then(function(data) {
let info = data.results;
return info.map(function(stuff) {
let li = createNode('li');
let span = createNode('span');
span.innerHTML = `${stuff.name} ${stuff.price}`;
append(li, span);
append(ul, li);
})
})
.catch(function(error) {
console.log(error);
});
// Uncomment to enable Bootstrap tooltips
// https://getbootstrap.com/docs/4.0/components/tooltips/#example-enable-tooltips-everywhere
// $(function () { $('[data-toggle="tooltip"]').tooltip(); });
// Uncomment to enable Bootstrap popovers
// https://getbootstrap.com/docs/4.0/components/popovers/#example-enable-popovers-everywhere
// $(function () { $('[data-toggle="popover"]').popover(); });
//# sourceMappingURL=main.js.map
![dom-манипуляции с Yeoman-приложением с использованием данных API [closed] TheFAQ.ru](https://thefaq.ru/wp-content/uploads/2023/01/logo-250.png)