Modification for the controller declaration

use the .controller method of your Angular module for application
instead of declaring controller as function.