If I attach the function to the controller, I can't access it anymore  through a ng-click attribute.