<div ng:controller="SuffixController" class="row-fluid" id="body-main">
    <script type="text/javascript">
        /* Flexslider */
        $(window).load(function () {
            "use strict";
            $('.flexslider').flexslider({
                animation: "fade",
                start: function (slider) {
                    $('.np-controls a.next').click(function (event) {
                        event.preventDefault();
                        slider.flexAnimate(slider.getTarget("next"));
                    });
                    $('.np-controls a.previous').click(function (event) {
                        event.preventDefault();
                        slider.flexAnimate(slider.getTarget("previous"));
                    });
                }
            });
        });
    </script>
    <div class="flexslider">
        <div class="slides">
            <section class="flex-active">
                <div class="item contact" id="5">
                    <div class="page-head">
                        <div class="row">
                            <div class="col-md-5">
                                <h3>Suffix Array</h3>
                            </div>
                            <div class="col-md-7">
                                <div class="np-main">
                                    <div class="np-controls">
                                        <a href="#/blogs" class="previous"><i class="fa fa-arrow-circle-left"></i></a>
                                        <a href="#" class="next"><i class="fa fa-arrow-circle-right"></i></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                  
                    <div class="contact-form">
                        <h4>Input string</h4>
                        <form id="contactForm" method="post">
                            <div class="row">
                                <div class="col-md-4">
                                    <input type="text" class="col6" name="Ime" ng:model="obrada.text" placeholder="string" required />
                                </div>  
                            </div>
                            <button type="submit" ng:click="createSuffix()">Create Suffix</button>
                            <button type="submit" ng:click="sortiraj()">Sortiraj</button>
                        </form>
                        <table class="">
                            <thead>
                                <tr>                      
                                    <th><span>id</span></th>
                                    <th><span>Suffix</span></th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng:repeat="s in suffixs">
                                    <td style="width:10%">{{s.id}}</td>
                                    <td style="width:10%"><span data-ng-bind="s.text"></span></td>
                                </tr>
                            </tbody>
                        </table>
                        <table>
                            <thead>
                                <tr>
                                    <th><span>Sorted Sux</span></th>
                                    <th><span>SA[i]</span></th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng:repeat="sa in _suffixs">
                                    <td style="width:10%"><span data-ng-bind="sa.text"></span></td>
                                    <td style="width:10%">{{sa.id}}</td>                                  
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </section>
        </div>
    </div>
</div>
