I know I can override a directive in the following way:
angular.module('3th-party-module')
.directive('3th-party-directive', my3rdPartyDirective)
However I would like to override the behavior of the form directive. I thought doing:
angular.module('ng')
.directive('form', myFormDirective)
But it's not working. I get the following error:
Failed to instantiate module ng due to: Error: [$injector:unpr] Unknown provider: $compileProvider
Is there a way to do this?
The reason I want this is because errors propagate by default to the parent form, and I don't want this behavior because it disables my submit buttons.