hello angular mermaid !

data binding sample

--> File Download Link



<div ng-controller="ctrls">
    <label>refresh intaval time (ms) : <input ng-model="interval"></label>
    <textarea ng-model="mymodel" style="width:100%;" rows="10"></textarea> 
    <ng-mermaid nm-model="mymodel" nm-refreshinterval="interval" ></ng-mermaid>
</div>
<script>
    'use strict';
    var myApp = angular.module('exampleapp',['ngMermaid','ngSanitize']);
    myApp.controller('ctrls', ['$scope', function($scope) {
        $scope.mymodel ='graph TD;\n  S-->B;\n  S-->C;\n  B-->D;\n  C-->D;';
        $scope.interval = 500;
    }]);
</script>

inner text sample


    <ng-mermaid>
        graph TD;
            A-->B;
            A-->C;
            B-->D;
            C-->D;
    </ng-mermaid>
graph TD; A-->B; A-->C; B-->D; C-->D;

    <ng-mermaid>
        sequenceDiagram
            participant Alice
            participant Bob
            Alice->John: Hello John, how are you?
            loop Healthcheck
                John->John: Fight against hypochondria
            end
            Note right of John: Rational thoughts <br/>prevail...
            John-->Alice: Great!
            John->Bob: How about you?
            Bob-->John: Jolly good!
    </ng-mermaid>
sequenceDiagram participant Alice participant Bob Alice->John: Hello John, how are you? loop Healthcheck John->John: Fight against hypochondria end Note right of John: Rational thoughts
prevail... John-->Alice: Great! John->Bob: How about you? Bob-->John: Jolly good!