![]() The (dev) dependencies and supportive files that are needed to develop, build, and test the Angular library would be an overkill for the core library and should not bother users that are not using the Angular integration. I think it is not good practice to have lots of integrations along with the core library in one repository, especially when it comes to more complex libraries/frameworks such as Angular. Please help.įew posts above, I stated the main reason for creating an extra repository and npm package: In the end, I followed the official documenation for creating and publishing an Angular library.Īlso getting error using ngx-tagify. I didn't make a PR as has often requested it here. (and may give feedback if something is missing) So, Angular users may want to check it out: ngx-tagify Finally, I had some time to polish and publish it to npm. It allows multiple instances of tagify, implements ControlValueAccessor (so you can use it with ngModel and reactive forms), comes with proper type declaration, a demo app. That's why I created a proper Angular library. However, the existing Angular integration that comes with this library had some pitfalls: no multiple instances possible (I just see, this seems be fixed by now), the way you need to integrate it to your app, CSS classes are not applied to the input element, etc. Half a year ago, I have started using tagify in my project (thanks for this great library). I really like tagify btw □ I'll probably replace choices.js for tagging at least. I'll test a little more and provide a MR for the 2 problems. There is a typo in the Settings interface and it seems out of date anyway.The singleton service doesn't really make sense because you could have multiple instances of the component.add Tagif圜omponent to declarations section in a module and TagifyService to providers sectionīut you have to provide settings, otherwise it isn't initialized.add node_modules/choices.js/public/assets/scripts/ and node_modules/choices.js/public/assets/styles/ to scripts/ styles section in angular.json.You have to do the following to make it work: The angular integration is delivered as source, not as compiled module. addTags ( ) // or add tags with pre-defined propeties tagify. Original input/textarea element values kept in sync with Tagify.Internet Explorer - A polyfill script should be used: (in /dist).Easily change direction to RTL (via the SCSS file).Tags can be trimmed via hellip by giving max-width to the tag element in your CSS.Has built-in CSS loader, if needed (Ex.Automatically disallow duplicate tags (vis "settings" object).Each tag can have any properties desired (class, data-whatever, readonly.).Supports read-only mode to the whole componenet or per-tag.ARIA accessibility support(Component too generic for any meaningful ARIA).Tags can be created by Regex delimiter or by pressing the "Enter" key / focusing of the input.Can paste in multiple values: tag 1, tag 2, tag 3 or even newline-separated tags.Auto-suggest input as-you-type with ability to auto-complete.Allows setting suggestions' aliases for easier fuzzy-searching.Shows suggestions selectbox (flexiable settings & styling) at full (component) width or next to the typed texted (caret).Supports Templates for: component wrapper, tag items, suggestion list & suggestion items.Supports mix content (text and tags together).Can be applied on input & textarea elements.Transforms an input field or a textarea into a Tags component, in an easy, customizable way, with great performance and small code footprint, exploded with features.Vanilla ⚡ React ⚡ Vue ⚡ Angular
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |