$scope.createProduct = function () {
console.log("inside createProduct click")
console.log($scope.Product);
console.log($scope.selectedGroups);
$http.post('Product/CreateProduct', $scope.Product).success(function (response) {
console.log(response);
console.log(response.success);
if (response.success == true) {
$scope.status = "Successfully Created Product";
$mdDialog.hide();
}
});
};
以上是我的发布代码。我想将"$scope.selectedGroups"
添加到$scope.Product
例如:
$scope.Product = {
"ProductName": "FirstProduct",
"ContentLink: "SampleLink"
"SelectedGroups":{"one"},{"two"},{"three"}
}
此处"SelectedGroups"= $scope.selectedGroups
如何从控制器附加此内容