eGovPDX / Council-Agenda-App

5 stars 0 forks source link

Make more robust URL routing script #14

Open OscarGodson opened 13 years ago

OscarGodson commented 13 years ago

Currently uses just a onhashchange event that has hardcoded events based on the URL. This should be dynamic. Something like:

url.register('/agenda/[0-9]+',function(matches){
    console.log(matches[0]); //Would return the agenda id 12 from http://site.com/agendaapp/#!/agenda/12, for example
});
OscarGodson commented 13 years ago

Should also link to items and sessions like:

http://portlandonline.com/councilagenda/#!/agenda/21/session/45
http://portlandonline.com/councilagenda/#!/agenda/21/item/123