NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io



const _url = "http://localhost:5000/api/categories/";
// const _urlIIS = "http://localhost:28677/";


let categories = [];

function getCategories() {
fetch(_url)
.then(response => response.json())
.then(data => _categoriesCreator(data))
.catch(error => console.log("service not available!", error))
}
getCategories();


function _categoriesCreator(data) {
const tbody = document.getElementById("tbody");
tbody.innerHTML = '';

const button = document.createElement("button");
const icon = document.createElement("i");

data.forEach(item => {


// silme butonu
let deleteIcon = icon.cloneNode(false);
deleteIcon.setAttribute("class", "fas fa-trash");

let deleteButton = button.cloneNode(false);
// deleteButton.innerText = 'delete';
deleteButton.appendChild(deleteIcon);
deleteButton.setAttribute('class', 'btn btn-sm shadow-sm text-danger');


// düzenleme butonu
let editIcon = icon.cloneNode(false);
editIcon.setAttribute("class", "fas fa-pencil-alt");

let editButton = button.cloneNode(false);
// editButton.innerText = 'edit';
editButton.appendChild(editIcon);
editButton.setAttribute('class', 'btn btn-sm shadow-sm text-warning mr-1');




let tr = tbody.insertRow();

// 1. hücre Id bilgisi
let td0 = tr.insertCell(0);
td0.setAttribute("class", "d-none");
let id = document.createTextNode(item.id);
td0.appendChild(id);

// 2. hücre categoryname bilgisi
let td1 = tr.insertCell(1);
let categoryname = document.createTextNode(item.categoryName);
td1.appendChild(categoryname);

// 3. hücre description bilgisi
let td2 = tr.insertCell(2);
let description = document.createTextNode(item.description);
td2.appendChild(description);


let td3 = tr.insertCell(3);
td3.appendChild(editButton);
td3.appendChild(deleteButton);
});
categories = data;
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.