I have two .js files. I want to "read" the second file after the function of the first .js file ends. How do i do that?
html file:
<div class="row connectedSortable" id="sortable1" ng-app="graficosApp" ng-controller="graficosAppCtrl">
<button ng-click="loadElements()">Load Elements</button>
</div>
first javascript file (angularjs):
var app = angular.module('graficosApp', []);
app.controller('graficosAppCtrl', function ($scope, $http) {
$scope.CarregarGraficos = function () {
var myEl = angular.element(document.querySelector('#sortable1'));
myEl.prepend(content);
}
});
and then i have my second javascript file, that will add some functionalities to buttons added on the angularjs file. i want to load the second file after the first file.
Thank you.