Esri / application-boilerplate-3x-js

Starter application that simplifies the process of building templates for the ArcGIS.com template gallery.
https://developers.arcgis.com/javascript/
Apache License 2.0
90 stars 68 forks source link

Add support for boolean url parameters to template.js #44

Closed kellyhutchins closed 9 years ago

kellyhutchins commented 9 years ago

Many of the url params I use in templates are boolean but when retrieved as url params they are strings. I think we should add some logic into the _getUrlParamValues function to handle the conversion. Something like this?

var item = urlObject.query[items[i]]; obj[items[i]] = item === "true" || (item == "false" ? false : item);

@driskull thoughts?

driskull commented 9 years ago

@kellyhutchins Makes sense to me. I had done this for the public gallery app.

kellyhutchins commented 9 years ago

Cool I'll add it in.

driskull commented 9 years ago

hey @kellyhutchins did this get put in yet?

kellyhutchins commented 9 years ago

@driskull not yet.