-
Notifications
You must be signed in to change notification settings - Fork 94
TagCloud & Angular 8 integration #14
Copy link
Copy link
Open
Description
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;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels