<template iterate="thing in collection">
처럼 보이는 다트 예제/튜토리얼과 <template repeat="thing in collection">
을 사용하는 튜토리얼을 보았습니다. 그들은 똑같은 일을하는 것처럼 보입니다. 왜 그들 사이의 차이점과 주어진 상황에서 다른 하나 대신에 권장되는 이유는 무엇입니까?<template iterate = "...">와 <template repeat = "...">의 차이점
4
A
답변
10
여기에 바로 변경 로그에서의 :
추가 '템플릿 반복'템플릿으로 반복와는 달리 으로 사용하는 경우 대신 태그의 아이들의 태그를 반복 속성이. ,
<select> <template iterate='name in results'> <option>{{name}}</option> </template> </select>`
template
태그select
내에서 허용되지 않습니다 so the solution is to use :
이유는 HTML을 다음은 대부분의 HTML 파서에 대한 잘못된 것입니다
<select>
<option template repeat='name in results'>{{name}}</option>
</select>
template repeat
이 최근에 추가 (2013 4월), 그리고 결국 template iterate
을 AFAIK로 대체 할 것이지만 현재는 두 가지 모두 지원됩니다.
관련 문제
- 1. <!DOCTYPE> html/template
- 2. 변경 <template> (TemplateElement)는 프로그래밍
- 3. Task <>와 IAsyncOperation <>의 차이점
- 4. Python 스크립트의 TypeError 파일 "<template>"
- 5. <template> polymer.js 초기화 이벤트
- 6. <template> 태그 안에 '깨짐'링크가 있습니다.
- 7. <<와 =의 차이점
- 8. <g : applyLayout />과 <g : render template />의 차이점은 무엇입니까?
- 9. backbone.js json -> template
- 10. bash의>와 >>의 차이점
- 11. 에 appendChild() I 기능 <code>importNode()</code>를 이용한 HTML5 <code><template></code>의 활성 구할 가져온 템플릿
- 12. 스트럿츠 <logic : equal> 내에서 <logic : iterate>
- 13. <html:select> inside <logic : iterate>
- 14. Meteor에서 여러 템플릿을 번갈아 사용하는 방법은 무엇입니까?</p> <pre><code><head> <title>MyApp</title> </head> <body> <template name="bodyContent"> {{subContent}} </template> </body> </code></pre> <p>다음, 나는 세 가지 템플릿 정의 :
- 15. <semaphore.h>과 <sys/sem.h>의 차이점
- 16. 의 차이점 <a>과 <button>
- 17. <RequiredTargetFramework>와 <targetframeworkversion>의 차이점은 무엇입니까?
- 18. 내가</p> <pre><code>class Article < ActiveRecord::Base has_one :template end </code></pre> <p>및</p> 템플릿 모델은 공간 속성을 가지고있다 <pre><code>class Template < ActiveRecord::Base has_many :articles end </code></pre> <p>이 one-to-many 연관
- 19. : 여기 <pre><code>Vue.component('upper', { props: ['value'], template: '#upper-template', computed: { formattedValue: function() { return this.value.toUpperCase(); } } }); </code></pre> <p></p> 템플릿이다 : [뷰는 경고]
- 20. ToArray()와 ToArray의 차이점 <int>();
- 21. 레일 : <% =와 <% ==의 차이점?
- 22. ngBindCompile 지시문은 어떻게 작성됩니까? 사전에</p> <pre> Existing: ng-bind-template="{template}" To write: ng-bind-compile="var" where var="{template}" </pre> <p>감사 :
- 23. OOP에서 ->와 ::의 차이점
- 24. <s : property ..>와 $ {param}의 차이점
- 25. <template is = "dom-if"> = "잘못된 속성 값"
- 26. HTML :: Template <TMPL_IF> 블록을 건너 뛰는 중
- 27. 오브젝트를 선언하는 법 <template> in C++
- 28. 왜 z3c.RML이 pageSize 속성을 무시합니까 <template>
- 29. <ui : composition template = "/ template.xhtml"> 잘못된 경로 : /template.xhtml
- 30. ejs.js의 <Template Path URL> 오류에 템플릿이 없습니다