Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/atomita/angular-sequence-diagram


https://github.com/atomita/angular-sequence-diagram

Last synced: 11 days ago
JSON representation

Awesome Lists containing this project

README

        

Angular Sequence Diagram
================

This is a module for using [js-sequence-diagrams](http://bramp.github.io/js-sequence-diagrams/) on AngularJS.

## example

```js
// app.js

var app = angular.module("app", ["atSequenceDiagram"]);

// using provider.
app.config(["sequenceDiagramProvider", "$sceProvider", function(sequenceProvider, $sceProvider){
// set common option.
sequenceProvider.option({theme: "hand"});

// enable language-sequence directive.
sequenceProvider.enableLanguageDirective();
}]);

// using on controller.
app.controller("ctrl", ["$scope", "sequenceDiagram", "$sce", function($scope, sequence, $sce){
$scope.svg = $sce.trustAsHtml(sequence.render("A->B: Does something"));
}])
```

```html















A->B: E
A->B: Does something



A->B: A






A->B: C
A->B: Does something

```