Questions tagged [marko]

An HTML-based templating engine that compiles templates to Node.js-compatible JavaScript modules and supports streaming, async rendering and custom tags.

Marko is a fast and lightweight HTML-based templating engine that compiles templates to CommonJS modules and supports streaming, async rendering and custom tags.

Learn more on http://markojs.com/.

64 questions
1
vote
0 answers

What is the reason of "Cannot read property 'insertInto' of undefined" error in MarkoJS component?

I usually face the above error when doing some changes to a component by listening to the window resize event. I think this happens because somehow the component will get dirty during the update and need rerender. But what is the solution if…
Rman
  • 458
  • 4
  • 7
1
vote
1 answer

How can i nest marko components in the file tree

i dont know how to access components that are nested in the components folder in my app's root index component. what i expected was that i can reference them via a nested html tag i have a very solid functional react background and try to create my…
TheDomis4
  • 122
  • 1
  • 13
1
vote
1 answer

Marko Dynamic Tag with Component

I have a marko website where I have some dynamic components being called via a for loop: /pages/note/index.marko import layout from "../../layouts/base" <${layout} title="test"> <${card} /> …
Conflagrationator
  • 251
  • 1
  • 3
  • 8
1
vote
1 answer

When I deploy the application Nodejs with Markojs at google cloud app engine, I receive the error "EROFS: read-only file system...'"

I'm new in Google Cloud Resources. I'm deploying a Nodejs(with Markojs) application at google cloud's app engine and I'm getting the error "EROFS: read-only file system, open '/srv/src/app/converter/form/.7.1565968890124.converter.marko.js'" At…
1
vote
1 answer

Is Marko framework active?

I've looked a the Marko framework from eBay, and it looks very promising. Actually pretty awesome. But the activity around the project seems very quiet. No videos, presentations etc on youtube the last year, very few if any component/UI collections…
Torgeir
  • 43
  • 1
  • 2
  • 6
1
vote
0 answers

How to emit an event that is visible for an other sibling component in marko.js?

I would like to create a global component that will handle alert boxes and notifications on my page. The trigger will be in other sibling components The code for alerts.marko is the…
Alexandru Olaru
  • 6,842
  • 6
  • 27
  • 53
1
vote
2 answers

MarkoJS for loop over array of objects

I really need help with a pretty simple and trivial problem, but here it goes. I am using marko on the server side in NodeJS and am rendering my views via: ctx.render({ }); with koa-router and koa. I need help in the html dept on how to go about…
1
vote
1 answer

Styles and events not working in marko template

My component is loading fine but the styles are not loading, nor are the events firing. I am following the documentation and no errors are being thrown but it seems I might be missing something fundamental here? View template rendered with…
Emile Paffard-Wray
  • 1,006
  • 2
  • 9
  • 17
1
vote
2 answers

Use component/tag contents in Marko template

Say I'd like to have a component that wraps its contents (aka children):
${input.heading}
... contents come here ...
Then use it like: ... Lorem ipsum…
P Varga
  • 19,174
  • 12
  • 70
  • 108
1
vote
2 answers

LassoJS and Marko-WIdgets

So guys, I'm in a bit little nightmare here. Starting using makoJs and Marko-widgets loving so far. But... This is the thing I follow the organization of some samples and integrate with the lassoJS. So in the lasso way of doing things I do not get…
1
vote
1 answer

Add Active Class to Current list menu item without using clientside JS/jquery in marko?

i have menu list and i want to add active class on the specific menu item which is clicked e.g if it clicks on contact page then contact option in the menu become active class. I am using NodeJS and Koa here is my code of how…
DEO
  • 316
  • 2
  • 4
  • 18
1
vote
1 answer

is there any way to setState more then one time in marko js widget?

i am setting state on button click. i.e. this.setState('array', array); on first setState it affect on frontend side. but when i push more value to array and try to set state again to doesn't affect the state and frontend. is there any way to…
1
vote
1 answer

generate html template engine i18n

I am searching for a solution to modularize static html files and to add multilanguage support. I want to generate static html files with gulp which are then served through an apache server. I am now thinking about using the template engine marko to…
1
vote
1 answer

Pass variable values to velocity template in Node.js

I have Velocity templates stored in a database which contain loops as follows: #foreach($project in $projects)${project.name}#end I want to pass value to project names via a form in Nodejs application, designed in marko templating engine.
boomcode
  • 399
  • 1
  • 14
1
vote
2 answers

Conditional class in Marko JS Template

I am using the layout taglib to extend a page to its template but i don't know how to pass a variable to the main layout and apply a conditional class. Considering this is my main-layout.marko …
crash
  • 4,152
  • 6
  • 33
  • 54