<div class="row">

            <div class="col-md-6">

                <div class="output row" id="output" style="padding-left: 30px; margin-bottom: 5px;" ng-include src="template"></div>

                <div clas="row">
                    
                    <div ui-ace="{
                         useWrapMode : true,
                         showGutter: true,
                         theme:'twilight',
                         mode: 'javascript',
                         onLoad: aceLoaded,
                         onChange: aceChanged
                         }">
                    </div>
                    
                </div>

            </div>

            <div class="guide col-md-6" id="guide">
                <table class="table table-hover table-condensed">
                    <thead>
                        <tr>
                            <th>Tehtävä</th>
                            <th>Valmis</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="element in guide">
                            <td>{{element.text}}</td>
                            <td>
                                <button class="btn btn-success" ng-click="assess(numLeft, varLeft, numRight, varRight, varX)" ng-show="! element.done" data-loading-text="Tarkistan" >Tarkista</button>
                                <span class="glyphicon glyphicon-ok" ng-show="element.done"></span>
                            </td>
                        </tr>
                    </tbody>
                </table>
                
                <div ng-include="'partials/javascript.html'">
                
            </div>
            
        </div>
<div class="row">

            <div class="col-md-6">

                <div class="output row" id="output" style="padding-left: 30px; margin-bottom: 5px;" ng-include src="template" onLoad="loaded()" ></div>

                <div clas="row">
                    
                    <div ui-ace="{
                         useWrapMode : true,
                         showGutter: true,
                         theme:'twilight',
                         mode: 'javascript',
                         onLoad: aceLoaded,
                         onChange: aceChanged
                         }">
                    </div>
                    
                </div>

            </div>

            <div class="guide col-md-6" id="guide">
                <table class="table table-hover table-condensed">
                    <thead>
                        <tr>
                            <th>Tehtävä</th>
                            <th>Valmis</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="element in guide">
                            <td>{{element.text}}</td>
                            <td>
                                <button class="btn btn-success" ng-click="assess(numLeft, varLeft, numRight, varRight, varX)" ng-show="! element.done" data-loading-text="Tarkistan" >Tarkista</button>
                                <span class="glyphicon glyphicon-ok" ng-show="element.done"></span>
                            </td>
                        </tr>
                    </tbody>
                </table>
                
                <div ng-include="'partials/javascript.html'">
                
            </div>
            
        </div>
Call loaded when loading has been done.
Call loaded when loading has been done.
