Reputation: 5102
Suppose I have a custom directive that fetches an array result from certain location , How could I possibly use v-repeat alongside my directive internally rather than separately calling v-repeat externally.
Upvotes: 3
Views: 1072
Reputation: 17246
In Vue, you normally use directives (http://vuejs.org/guide/index.html#Directives) to modify the behavior of an existing DOM element. The behavior you are describing is more suited to a component (http://vuejs.org/guide/index.html#Components).
You would declare a component with a template
attribute that either inline or via reference to a <script>
style template would have markup that would include usage of v-repeat
.
Upvotes: 1