I
I
Ihor Gevorkyan2016-06-17 14:10:38
JavaScript
Ihor Gevorkyan, 2016-06-17 14:10:38

How to pass data from JS to Jade?

Good afternoon.
Data in .json -> JS (XMLHttpRequest) -> Jade templates -> html ,
how to set up data transfer from JSON to Jade templates?
(without modules like gulp-jade-template, i.e. XMLHttpRequest is a required link in the chain)

There are examples in the Jade doc , but at a low level, all jade.anyMethod methods use fs methods, I have it installed and require( 'fs') via browserify to my js app, but any of its methods throw an error fs.anyMethod is not a functioneven though the IDE sees its methods. There is no need to emphasize the error, I am looking for an answer to the question of how it is possible to establish the above circuit, thanks!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question