Alert dialog

Question: Why do you declare "extend" function instead of using angular.extend()? 
https://docs.angularjs.org/api/ng/function/angular.extend