I neeed an input field where I can enter only the values 1,2 or 3 so i\'m trying to build a directive which prevents all changes to the model if it doesn\'t match these valu
I'd recommend using the ng-pattern-restrict directive.
ng-pattern-restrict
Get the library and simply decorate your input like so:
GitHub: AlphaGit/ng-pattern-restrict