![]() |
Sammy.js - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Sammy.js (/showthread.php?tid=46198) |
Sammy.js - El Forum - 10-22-2011 [eluser]MaartenDeGroote[/eluser] Hi all, I am currently playing around with Sammy.js and CouchDB in CodeIgniter. All is going well and I followed the snippet found in on the Sammy homepage Code: // initialize the application Note that the extensions .json and .mustache are arbitrary to get the example to work. I created a controller called "app", which, until now, contains two methods: "get", and "view". The "get"-method contacts the CouchDb via cURL and then simply returns a JSON object. The "view"-method loads a template view that contains html and mustache pseudo-variables to be interpolated. The following code DOES NOT work Code: // initialize the application However, the following code DOES work Code: // initialize the application Obviously, I am very glad it does! But I want to know how CodeIgniter interprets the .json and .mustache extensions in the controllers. Is it seen as an argument or just ignored (because I don't get an error) ? Thanx in advance! Maarten |