To do what you want, whenever the application starts you redirect the route to any screen, to do this, do a state go in the run:
angular.module('myApp', [])
.config(something => {})
.run(function ($state) {
$state.go('rotaDaTelaComVideo');
});
According to Angular documentation: Documentation
config
is called first at module initialization.
run
is called once at module initialization, right after config.
Compilation of policies and others ...
Controllers are created.
Policy link, if any.
In this way, it is safe to call a route in the run, at the same time that in the next iteration of the Angular it will load its module.
Bonus :
Still, if you want the video to run only once, you can save a flag in the localStorage:
angular.module('myApp', [])
.config(something => {})
.run(function ($state, $window) {
if ($window.localStorage['alreadyShown'] !== true) {
$state.go('rotaDaTelaComVideo');
$window.localStorage['alreadyShown'] = true;
}
});
So it will only run the first time the user starts the application, or after clearing all data from the cache.