분류 전체보기 (291) 썸네일형 리스트형 html input checkbox checked 확인방법 html input checkbox checked 확인방법 input ckeckbox 체크 확인 $("#check-box-3").is(":checked") // boolean 📄 html input 태그에 type이 'checkbox'이면, 체크박스가 생성된다. 장바구니에 담긴 상품 가져올 때, client storage에 저장 window.localStorage.setItem('productIdList', productIdList); productIdList라는 key값을 가지는 productIdList(array) 저장! 장바구니 모든 목록 가져오기 📄 front function showProductsInCart() { $("#products-in-carts").html(""); $.ajax({ ty.. 4차 미니프로젝트, 이커머스- 원하는 상품 장바구니 수량수정 & 삭제 4차 미니프로젝트, 이커머스- 원하는 상품 장바구니 수량수정 & 삭제 장바구니 리스트 모두 가져오기 📄 back(Node.js) // 내가 가진 장바구니 목록을 전부 불러오기 router.get('/cart', async (req, res) => { // const { userId } = res.locals.user; const cart = await Cart.findAll({ // where: { // userId, // }, }); const productIds = cart.map((c) => c.productId); const productsKeyById = await Product.findAll({ where: { productId: productIds, }, }).then((products) =.. 4차 미니프로젝트, 이커머스- 원하는 상품 장바구니에 담기 4차 미니프로젝트, 이커머스- 원하는 상품 장바구니에 담기 이번에 이커머스 프로젝트에서 내가 맡은 부분은 장바구니! 일단 임의의 값을 상품으로 두고 장바구니 담기 하다보니, 어쩌다가 상품 리스트까지 만들게 되었다. ejs를 활용해보고 싶으나, 이해하기 영 싶지 않아서 그냥 내가 잘 알고 있는 ajax로 구현중~ 📄 productList front function makeProduct(image, info, name, price, productId) { let tempHtml = ` 제품명 : ${name} 설명 : ${info} ${price}원 장바구니 `; $("#products-box").append(tempHtml); } productList를 만들때 장바구니 담기 버튼에 productId를 같이.. project 관련 작업하기 좋은 사이트들 project 관련 작업하기 좋은 사이트들 📌 Frame Work Excalidraw Excalidraw — Collaborative whiteboarding made easy Excalidraw is a virtual collaborative whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them. excalidraw.com Pixso 홈페이지-스케치, 피그마 대신 차세대 UI 디자인 툴, 온라인 실시간 협업 지원 Pixso 홈페이지-스케치, 피그마 대신 차세대 UI 디자인 툴, 온라인 실시간 협업 지원 지능형 구성 요소를 통한 프로토타이핑 Pixso 구성 요소 라이브러리는 그 어느 때보다도 쉽게 프.. TS 입문 주차 TS 입문 주차 2023.01.17 - [JavaScript] - 타입스크립트 기초문법1 2023.01.18 - [JavaScript] - 타입스크립트 기초문법2 2023.01.19 - [JavaScript] - TS, 내가 만든 포켓몬 크롤링 프로그램 2023.01.30 - [JavaScript] - TS, 기본적인 CRUD 입문주차때 배운 내용을 정리! 📌 git repo https://github.com/godee95/TS_prac GitHub - godee95/TS_prac: TS study TS study. Contribute to godee95/TS_prac development by creating an account on GitHub. github.com TS, 기본적인 CRUD TS, 기본적인 CRUD 인터페이스를 이용한 데이터 모델링 📄 src/items/item.interface.ts // BaseItem -> 아이템을 수정, 등록할 때 사용 export interface BaseItem { name: string; price: number; description: string; image: string; } // Item -> 특정한 값을 검색하거나 삭제할때 사용 export interface Item extends BaseItem { id: number; } 📄 src/items/items.interface.ts import { Item } from "./item.interface"; // 아이템들을 합치기 위한 인터페이스 생성 export interface Items .. TS Utility Types TS Utility Types 📌 partial 필수 사항을 선택사항으로 변경 interface Toppings { tomatoes: boolean; onion: boolean; lettuce: boolean; ketchup: boolean; } const myToppings: Toppings = { tomatoes: true, onion: true, lettuce: true, ketchup: true, }; const partialToppingsIWant: Partial = { tomatoes: true, onion: undefined, }; console.log( "~ file: index.ts:19 ~ partialToppingsIWant", partialToppingsIWant ) myToppin.. Type Script 제너릭타입(Generic types) Type Script 제너릭타입(Generic types) 📌 제너릭이란? 선언 시점이 아닌 생성 시점에 타입을 명시하여 하나의 타입만이 아닌 다양한 타입을 사용할 수 있도록 하는 기법 전달받은 타입을 확인 및 반환을 할 수 있고 타입을 제한 할 수도 있습니다. 📌 배열 선언 📌 제너릭을 굳이 사용하는 이유는? 제네릭을 선언할 때 관용적으로 사용되는 대표적인 식별자로 T가 있고, 그 외에 U와 V가 있습니다. 반드시 T, U, V를 사용하여 하는 것은 아니지만 관용적인 식별자를 쓰는게 모범적입니다. 📄 index.ts interface MyInterface { value: string | number | string[]; } const stringObject: MyInterface = { value: ".. Type Script 열거형(Enums) Type Script 열거형(Enums) numberEnum 📄 index.ts enum Color { Red, Green, Blue, } console.log("---------") const myColor = Color.Red; console.log(myColor); // 0 const yourColor = Color.Green; console.log(yourColor) // 1 const myNewColor = Color.Blue; console.log(myNewColor) // 2 console.log("---------") console.log(Color["Green"]) // 1 // reverse mapping console.log(Color[0]) // Red console.log(Colo.. 내일배움캠프 4기_Node TS 입문, 10주차 WIL 내일배움캠프 4기_Node TS 입문, 10주차 WIL 2023.01.16 - [JavaScript] - TypeScript란? 2023.01.17 - [JavaScript] - 타입스크립트 기초문법1 2023.01.18 - [JavaScript] - 타입스크립트 기초문법2 2023.01.19 - [JavaScript] - TS, 내가 만든 포켓몬 크롤링 프로그램 2023.01.17 - [알고리즘] - DP, Dynaminc Programming ✏️ 이번주 배운 내용 TypeScript TS 기초 문법 크롤링 DP ✏️ 어려웠던 부분 TS 문법이 생소해서 그런가 오류가 발생해도 무슨 문제인지 명확히 모르겠다. 저번주에 배운 DFS 응용 문제들을 푸는데, 어렵다. 거의 다른 사람 코드를 봐도 이해하기 힘.. 이전 1 ··· 8 9 10 11 12 13 14 ··· 30 다음