Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atomita/angular-viz
https://github.com/atomita/angular-viz
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/atomita/angular-viz
- Owner: atomita
- License: mit
- Created: 2014-12-15T10:20:51.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-01T08:53:12.000Z (almost 10 years ago)
- Last Synced: 2024-10-10T21:54:20.242Z (26 days ago)
- Language: CoffeeScript
- Size: 148 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
angular-viz.js
===========This is a module for using [Viz.js](https://github.com/mdaines/viz.js/) on AngularJS.
## example
```coffee
# app.coffeeapp = angular.module("app", ["atVizJs"])
# using provider.
app.config(["vizJsProvider", (provider)->
# set common option.
provider.option(
format: "svg"
engine: "dot"
)# enable language-dot directive.
provider.enableLanguageDirective()
])# using on controller.
app.controller("ctrl", ["$scope", "$sce", "vizJs", ($scope, $sce, viz)->
$scope.svg = $sce.trustAsHtml(viz.render("digraph { a -> b; }"))
])
``````html
digraph { c -> d; }
digraph { e -> f; }
digraph { i -> j; }
```
Note: If you want to use the rave.js, please use the ones that adopted [this change](https://github.com/RaveJS/rave/pull/70).