angular-ui-modal]1 for create my site and I want to show my modal automatically when the user enter in my webpage. With ng-click
is easy , I have this code:
var app = angular.module('app', ['ui.bootstrap']);
app.controller('HomeCtrl', ['$scope', '$modal', function($scope, $modal) {
$scope.openModal = function(data) {
var modalInstance = $modal.open({
templateUrl: 'modals/register.html',
resolve: {
data: function() {
return data === null ? {} : data;
}
}
});
};
}]);
But I do not know how trigger the modal when load page. Any help? Please
$modal
is an old version so you may want to consider upgrading. – Matthew Green Jan 16 at 16:10