SyntaxFix
Write A Post
Hire A Developer
Questions
You could use indexOf function.
indexOf
if(list.indexOf(createItem.artNr) !== -1) { $scope.message = 'artNr already exists!'; }
More about indexOf: