Frontend: Blocks controller for angularjs