Problem using m-for in a template
See original GitHub issueMoon is emitting this error in the console:
moon.js:179 [Moon] ERROR: The item "arr" was not defined but was referenced
I am trying to render loops in a template, here is a quick example below:
Moon.component('my-component', {
template: `<div>
<p>This is a Component!</p>
<select>
<option m-for="item in arr" value="{{item}}">{{item}}</option>
</select>
<span>End</span>
</div>`
});
const app1 = new Moon({
el: "#app1",
data: {
msg: "Hello Moon!",
arr: [4, 5, 6]
}
});
Anyone know what I am doing wrong? Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Pitch Deck Problem Slide | How-to Instructions
Create the perfect Problem Slide for your pitch deck and impress investors ✓ Content ideas ✓ Best practices ✓ Design proposals ✓ ➤...
Read more >What's Wrong with C++ Templates?
Templates are a natural match for lists (and container classes in general) because they not only let programmers write one List implementation rather...
Read more >Getting around issues with templates inside Dll in C++?
I currently have a game engine project structured in visual studio so that my 'Engine' is compiled into a dll for another project...
Read more >Problem with Templates during compilation
Hi guys, I have a problem during the compilation of my solver in OpenFOAM-7. I'll explain a bit my work. I'm translating a...
Read more >Tech Tip - Fix Default Template Issues - YouTube
CADimensions is an authorized SOLIDWORKS reseller for New York and Pennsylvania. If you would like to learn more about the products and ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks
@kbrsh can u update @kokujin jsfiddle ???