.directive('customTags2',function () { return{ restrict:'ECMA', template:'<div>2</div>', replace:true, priority:-1 } }) .directive('customTags3',function () { return{ restrict:'ECMA', template:'<div>3</div>', replace:true, priority:0, //小於0的directive都不會執行 terminal:true } })