docs(index): change examples to use `.controller` rather than global functions

Closes #46