fix(demo): Register MainCtrl controller in module not as global.

Fix for issue:  #3098.  Register the MainCtrl function in the demo module, not as a global function.