Fork me on GitHub
#beginners
<
2016-07-26
>
ordnungswidrig06:07:52

@leo.ribeiro: both, path parameters and query parameters are available in the :params key in the request and can be destructured by compojure. So (ANY „/foo/:id“ [id p1 p2] (…)) should work when requesting /foo/123?p1=a&p2=b

krchia17:07:41

what the heck is a #object[Object [object Object]]?

krchia17:07:16

i get that from this call: (ajax/GET {:url "https://data.gov.sg/api/action/datastore_search" :data {:resource_id "9326ca53-9153-4a9c-b93f-8ae032637b70" :q "Males"} :success #(println (str (.. % result total) " data results. success!")) :dataType "jsonp"})

scriptor17:07:12

@krchia: might be a json object

scriptor17:07:28

use (.log js/console ...) to inspect it

zackbleach17:07:39

Hey, I have a beginner re-frame question (cross posting from the re-frame channel): What’s the best way to preload an image I have access to before a component renders but not when my application starts? The ideas I've had are: * Use the js interop and create an image object as soon as I know the image URL which I could pass in to a my component at render time, but I don't know how to use an image object with Hiccups. * "Render" the component as soon as I know the image URL but set the style to "display=none". When I need to actually render the component update the style. Are there any better ones?

zackbleach17:07:03

I’m also a front end beginner, so any confirmation that this is a sane way of thinking is also appreciated 😉

krchia23:07:06

a little stumped as to what’s the cljs equivalent for "d.close = +d.close;"