Hello!
I need help with Angular/Bonita interaction in my project. I have a task - create connection between external web forms and a process. I watched Bonita webinars about Angular. In the last one I saw a good tool for this task(Forms->Redirect to URL), but it’s available only in subscription versions of Bonita. Now I’m trying to make the same thing in Community using AngularJS and REST like this:
/*controller with POST in my Angular-file*/
.controller('dataCtrlMain', function ($scope, $http) {
$scope.submitForm = function (form) {
$http.post('http://localhost:8080/bonita', $scope.user)
.success(function (data) {
console.log('data:', data);
})
.error(function (data) {
console.log('Error:', data);
});
};
/* In my index.html I pass variables to controller: ng-submit=“submitForm(dataForm)” in , ng-model=“user.name” and ng-model=“user.email”*/
Maybe someone has an example how to do it better? I need an advice!
Any help would be appreciated!