こんにちは、私は私の変更機能を発火させるが、私の問題は、私はすべてを削除したくない私はオブジェクト内の1つの項目を除外したいと思う。オブジェクトからの除外角度変更
function change() {
if (vm.location.type) {
angular.forEach(vm.location, function (value, index) {
delete vm.location;
});
}
}
ので、私は
vm.location.type
私
vm.location
が
vm.location.boundaries;
vm.location.region;
vm.location.address;
vm.location.name;
vm.location.nonVisitingRadius;
vm.location.visitingRadius;
私はあなたが何をしようとしているのか分かりませんが、オブジェクトから1つのキーを削除したい場合は、次のようにしてください: 'vm.location.region;' –
私がしようとしているのは、 vm.locationしかし私はまだそれが必要なのでvm.location.typeを削除したくありません –