Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TagCloud & Angular 8 integration #14

Open
Faouzii opened this issue May 6, 2021 · 0 comments
Open

TagCloud & Angular 8 integration #14

Faouzii opened this issue May 6, 2021 · 0 comments

Comments

@Faouzii
Copy link

Faouzii commented May 6, 2021

Hi,

I'm trying to integrate this tool in my angular 8 app, but with no success.

What I've tried so far:

  • I Installed TagCloud using npm install
  • I integrated tagCloud.js in my angular.json file :

"scripts": [
..
"./node_modules/TagCloud/dist/TagCloud.min.js",
...
],

  • I created a tagCloudFunction.js file under /src/assets/js and pasted the above code

const TagCloud = require('TagCloud');
const container = '.tagcloud';
const texts = [
'3D', 'TagCloud', 'JavaScript',
'CSS3', 'Animation', 'Interactive',
'Mouse', 'Rolling', 'Sphere',
'6KB', 'v2.x',
];
const options = {};
TagCloud(container, texts, options);

  • I integrated the tagCloudFunction.js also in angular.json file

"scripts": [
"./node_modules/TagCloud/dist/TagCloud.min.js",
"src/assets/js/tagCloud.js"
]

  • Finally I called the function TagCloud from my component.ts declare const TagCloud : any;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant