In my code, I am able to retrieve the ngModel name, but now I am looking for a way to also capture the form's name that contains the element with the "validacion" directive.
It is crucial for me to programmatically obtain the form's name where the HTML element resides. Since there can be multiple forms on the page, I require a dynamic solution to solve this. Your assistance is greatly appreciated.
.directive('validacion', function ($timeout,$rootScope,validacionCampos,$compile) {
return {
restrict: 'AE',
require: 'ngModel',
link: function (scope, element, attrs, ngModel) {
if (!ngModel){
console.log("no modal found")
return;
}