├── .gitignore ├── README.md ├── bower.json ├── package.json ├── LICENSE ├── angular-jqcloud.js └── examples └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | node_modules 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AngularJS jQCloud 2 | 3 | [![Bower version](https://badge.fury.io/bo/angular-jqcloud.svg)](http://badge.fury.io/bo/angular-jqcloud) 4 | 5 | Simple AngularJS directive for [jQCloud](https://github.com/mistic100/jQCloud), a beautiful words cloud generator. 6 | 7 | ## Usage 8 | 9 | ```html 10 | 11 | 12 | 21 | ``` 22 | 23 | Consult [jQCloud documentation](http://mistic100.github.io/jQCloud) for full options. 24 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-jqcloud", 3 | "version": "1.0.2", 4 | "author": { 5 | "name": "Damien \"Mistic\" Sorel", 6 | "homepage": "http://www.strangeplanet.fr" 7 | }, 8 | "description": "AngularJS directive for jQCloud 2 plugin", 9 | "main": "angular-jqcloud.js", 10 | "dependencies": { 11 | "angular": "1.x", 12 | "jqcloud2": "2.x" 13 | }, 14 | "keywords": [ 15 | "angularjs", 16 | "cloud", 17 | "jquery", 18 | "keyword", 19 | "tag" 20 | ], 21 | "license": "MIT", 22 | "homepage": "https://github.com/mistic100/angular-jqcloud", 23 | "repository": { 24 | "type": "git", 25 | "url": "git://github.com/mistic100/angular-jqcloud.git" 26 | }, 27 | "ignore": [ 28 | "**/.*", 29 | "node_modules", 30 | "bower_components", 31 | "test", 32 | "tests" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-jqcloud", 3 | "version": "1.0.2", 4 | "author": { 5 | "name": "Damien \"Mistic\" Sorel", 6 | "homepage": "http://www.strangeplanet.fr" 7 | }, 8 | "description": "AngularJS directive for jQCloud 2 plugin", 9 | "main": "angular-jqcloud.js", 10 | "dependencies": { 11 | "angular": "1.x", 12 | "jqcloud-npm": "3.x" 13 | }, 14 | "keywords": [ 15 | "angularjs", 16 | "cloud", 17 | "jquery", 18 | "keyword", 19 | "tag" 20 | ], 21 | "license": "MIT", 22 | "homepage": "https://github.com/mistic100/angular-jqcloud", 23 | "repository": { 24 | "type": "git", 25 | "url": "git://github.com/mistic100/angular-jqcloud.git" 26 | }, 27 | "ignore": [ 28 | "**/.*", 29 | "node_modules", 30 | "bower_components", 31 | "test", 32 | "tests" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Damien Sorel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /angular-jqcloud.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Angular jQCloud 1.0.2 3 | * For jQCloud 2 (https://github.com/mistic100/jQCloud) 4 | * Copyright 2014 Damien "Mistic" Sorel (http://www.strangeplanet.fr) 5 | * Licensed under MIT (http://opensource.org/licenses/MIT) 6 | */ 7 | 8 | angular.module('angular-jqcloud', []).directive('jqcloud', ['$parse', function($parse) { 9 | // get existing options 10 | var defaults = jQuery.fn.jQCloud.defaults.get(), 11 | jqcOptions = []; 12 | 13 | for (var opt in defaults) { 14 | if (defaults.hasOwnProperty(opt)) { 15 | jqcOptions.push(opt); 16 | } 17 | } 18 | 19 | return { 20 | restrict: 'E', 21 | template: '
', 22 | replace: true, 23 | scope: { 24 | words: '=words', 25 | afterCloudRender: '&' 26 | }, 27 | link: function($scope, $elem, $attr) { 28 | var options = {}; 29 | 30 | for (var i=0, l=jqcOptions.length; i 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |

Fixed size cloud :

19 | 20 | 21 |

Full width cloud :

22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 73 | 74 | 75 | --------------------------------------------------------------------------------