Hello,
<https://lh3.googleusercontent.com/-KudvDf81HjA/WGkwqzB1_dI/AAAAAAAAB2c/h6rWpYHEhT8JALJytwAfLuOdsQLEFtg9QCLcB/s1600/print_codigo_js.fw.png>
I'm trying to create a custom validation, where I put the 'required' attribute
on the specified form, it gives me a return from the guided object and all the
required entries from this tab. But, I have a problem. I am trying to put in
objects and arrays and it works, however, I would like to separate the arrays
and put in text, a certain tab has such fields required and display the fields
that are required. My problem is that it gives me the array return with text
and array all together, and I'm not getting them apart. What am I doing wrong?
var tabsRequired = {
'tab' : {
'label' : [],
'required' : []
}
}
angular.forEach(collection.tabs, function(tabs){
tab = angular.element(tabs.selector).text().trim()
tabsRequired['tab']['label'].push(tab);
tabsRequired['tab']['required'].push(tabs.required);
});
angular.forEach(tabsRequired['tab'], function(res){
console.log(res)
});
--
You received this message because you are subscribed to the Google Groups
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.