docs(guide/controller): use `.controller` syntax

Use the recommended `module.controller` syntax rather than global
functions to define controllers in the examples.