Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Tagify and Angular


Hi guys,

I'm trying to use tagify in my angular project but I'm not able to.

This is what I'm doing,

By reading the doc and also checking the code, apparently the CSS is already included in the project, so I'm not including anything in the angular.json

So I npm install tagify

In my angular component I have

@ViewChild("tagInput") tagInput: ElementRef;
private tagifyInput: Tagify;

ngAfterViewInit() {
// Access the native input element
const inputElement: HTMLInputElement = this.tagInput.nativeElement;

// Initialize Tagify
this.tagifyInput = new Tagify(inputElement, {
// Tagify options go here
});
}


Html

<input #tagInput placeholder="Type and press Enter" value="tag1, tag2 autofocus">


I can see the input text but it will show a json value like
[{"value":"tag1"},{"value":"tag2 autofocus"}]

What I'm missing ?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


Hola Felipe! estoy teniendo el mismo problema, serías tan amable de compartir con la comunidad la forma en la que lo resolviste?



Great to hear that you managed to get it working! If you have any more questions or need further assistance in the future, feel free to reach out.



Never mind I manage to get it working



Yes, spill the beans how did you get it working ?



How you can manage to get it working?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(