Hi there,
I’m trying to create a simple Cancel Custom Widget for use in Instantiation forms, for when a user realizes they don’t want to do the process…
My template is:
Cancel
and my controller is:
function($scope, $window){
console.log("Doing it anyway!"); //#1
$scope.onClick = function cancelOnClick($scope, $window) {
console.log("cancelling!"); //#2
$window.top.location.href = '/' + $scope.properties.bonitaWebAppName;
};
}
with one property:
bonitaWebAppName
Label: Bonita web app name
Treat as Dynamic value
Type: text
Default value: bonita
When I execute the process I always get the “Doing it anyway!” //#1 message but when I click the Button it never seems to fire…
I’m trying to learn angularjs but, it’s not that easy…
Thanks for the advice in advance,
regards
Sean
Update:
I’ve now seen how to do it…
Cancel
with controller:
function($scope, $window){
console.log("Doing it anyway!");
this.onClick = function cancelOnClick() {
console.log("cancelling!");
$window.top.location.href = '/' + $scope.properties.bonitaWebAppName;
};
}
But it still doesn’t work…