First of all, thank you for your reading. I am new to the language.
I am trying to use UI-SELECT and bind the data to controller.js to save into database.
I know that UI-SELECT should be used with ng-model in "A.selected" way.
I searched for some help but couldn't find how to make the below code in array style to work.
[HTML with UI-Select]
<ui-select ng-model = "project_customer_company.selected" theme="bootstrap">
<ui-select-match placeholder="">
{{$select.selected.customer_company_name}}</ui-select-match>
<ui-select-choices repeat="customer in customers | filter: $select.search">
<div ng-bind-html="customer.customer_company_name | highlight: $select.search"></div>
<div ng-bind-html="customer.customer_company_ceo | highlight: $select.search"></div>
</ui-select-choices>
[Controller.js]
$scope.project_customer_company = {};
$http.post("../crud/projects_insert.php", {
project_title : $scope.project_title,
project_customer_company : $scope.project_customer_company // coming from <UI-SELECT>, and this has to be changed like in array style but how?
})
I think I am almost there, but it is returning only "array" sign.
I know this might be easy, but I am lost for almost a whole day.
Any advice would be highly appreciated and hope this issue helps the others as well. :)
Thank you and have a good day!