Tried again to fix a silly mistake by using ng-click instead of onClick