Wie kann ich den Wert des Tags dynamisch ändern (d. H. ID und Name)? Hier stelle ich statischen Wert für Tag zur Verfügung, aber ich möchte es dynamisch ändern. Mein Code ist:Dynamische Änderung des Tag-Werts in formular
$scope.formFields = [ {
className : 'row',
fieldGroup : [
{
className : 'col-xs-12',
type : 'tag',
key : 'mytag',
templateOptions : {
placeholder : 'Select...',
}
} ]
} ];
$scope.myForm = {
mytag:[{"id":"1","name":"data"}]
};
Ok, was ist das Problem? Warum erstellen Sie keine Funktion, die so etwas wie '$ scope.myForm.mytag [0] .id = 2' und' $ scope.myForm.mytag [0] .name = 'newName'' macht. – Aron