Search Posts

Category: ng-tags-input

ngTagsInput – Restrict removal of items on Backspace

In Angular 1.x, I added some custom code to handle this requirement(On hitting backspace items should not be removed), here is the code snippet $scope.hackForBackspace = function(){ // if backspace return false if(event.keyCode == 8){return false;} } This works fine in Chrome, but does not work in FF and IE. Always ‘Error: event is not defined’ is coming in console log. Even I tried to pass on-tag-removing=”hackForBackspace($event);” – that also not working. Event is undefined […]

After adding tags-input tag remaining form fields are disabled

In my angularjs application i added ngTagsInput directive for tags-input field but after adding this field at end of all form fields it is working and remaining fields are disabled and not working, then i changed it’s location from last to top of all other form fields now remaining form fields are working. I didn’t understand this behavior. My requirement is tags-input field must be at end of all fields. Source: AngularJS