SimpleExampleApp: show how to use assets
Closed this issue · 1 comments
pesterhazy commented
Add an example of using an image to SimpleExampleApp, as the process is not obvious.
pesterhazy commented
You can use this macro to point to the file:
(defmacro static-img [filename]
`(js/require ~(str "../../../app/imgs/" filename)))
Second, for reloading I always use defonce
d vars for images so the packager doesn't get confused.
Third, you need to make sure the imgs
folder is in packager root (or use relative paths?) -- should verify this.