Execute code at startup of angular application April 11, 2023 by Tarik You can do like this, var app = angular.module('myApp',[]); app.run(function($rootScope) { //..... });