기록

  • 홈
  • 태그
  • 방명록

ng-repeat 2

[AngularJS] ng-repeat (사용법, 옵션)

ng-repeat="item in items | filter:search" ng-repeat는 AngularJS에서 제공하는 디렉티브 중 하나로, 배열 또는 객체의 각 항목을 반복하여 HTML 요소를 생성하는 데 사용됩니다. 1. 기본 사용 //js $scope.items = [ { name: "apple", color: "red" }, { name: "banana", color: "yellow" }, { name: "orange", color: "orange" } ]; {{item.name}} ({{item.color}}) 위의 코드에서 {{item.name}}과 {{item.color}}은 객체의 name과 color 속성 값을 출력합니다. 따라서 위의 코드는 다음과 같은 결과를 생성합니다. appl..

Frontend/angularjs 2023.05.03

ng-repeat 변경된 데이터 인식/ $apply()

스코프 변수에 값을 넣었지만 html상에서 바로 인식하지 못할 때 apply()를 사용하여 값이 변화된것을 알려야한다. js $scope.reapetList.push(data); $scope.$apply(); html {{item.value}}

Frontend/angularjs 2021.11.13
이전
1
다음
더보기
프로필사진

  • 분류 전체보기 (273)
    • Frontend (102)
      • javaScript (29)
      • react (30)
      • vue3 (24)
      • angularjs (2)
      • jquery (4)
      • html (4)
      • css (3)
      • HTTP 통신 (6)
    • gridLib (24)
      • auiGrid (2)
      • agGrid (7)
      • jqGrid (15)
    • Backend (57)
      • JAVA (22)
      • spring (23)
      • spring cloud (MSA) (10)
      • tomcat (2)
    • SQL (19)
      • RDBMS (14)
      • NoSQL (4)
    • python (1)
    • study (42)
      • 클라우드&쿠버네티스 (7)
      • 보안 (6)
      • 알고리즘 문제 풀이 (28)
      • 독서 (0)
      • 네트워크 (1)
    • tool (6)
      • git (5)
    • error (10)
    • 트러블슈팅 (1)

Tag

프로그래머스, error, 2024 데브크루, jqgrid, vue emit, BFS, dfs bfs, softeer, Python, Spring Security, dfs, KINX, mapper, mybatis, MSA, JWT, 프로그래머스 dfs bfs, JavaScript, 프로그래머스 정렬, 백준,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

Copyright © Kakao Corp. All rights reserved.

티스토리툴바