Both stands for IIFE pattern, 1st pattern only does self calling function which is taking global angular object. Where as in 2nd approach are passing parameters to while evaluating self calling function, and passing global parameter while calling function. Those global parameter will become local to function. Inner context of function will directly access passed global variable. Here its angular.
I'd suggest you to follow 2nd approach. Because local variables are faster to resolve than the global variables, but this is on a huge scale and you’ll never notice the speed increase - but also worth considering if we’re referencing our globals a lot!
(function (angular) {
a.module('app',[])
.....
})(angular)
Additional benefit would be, It save your some bytes while doing minification process, Just by having like
(function (a, b) { //and
a.module('app',[])
.....
})(window, angular)
Great article to have more information on it.