按照如下方式添加:
angular.module('XXXXXXXX', [])
.directive('XXXXXXXX', ['$mdDialog', function ($mdDialog) {
return {
restrict: 'E',
scope: {
............
},
templateUrl: './static/templates/directives/XXXXXXXX.html',
link: function ($scope, element, attrs) {
............
}
};
}]);