That function in turn opens a link picker and returns the url value when you select an item from the content tree
$scope.openLinkPicker = function () {
dialogService.linkPicker(
{
callback: populateLink
});
function populateLink(item) {
$scope.node = item;
$scope.BaseUrl = item.url;
var burl = document.getElementById("BaseUrl");
burl.value = item.url;
}
};
This does add the url to $scope.BaseUrl (I've checked by logging it to console) but the angular form doesn't validate, so that field remains ng-pristine and when the form submits that value is null. I've even tried adding the value in in javascript as above. Have tried forcing that field to focus, blur, nothing works.
When I try $scope.$apply() or $digest() it throws the '$apply is already in progress' error. Trying to $SetDirty or anything like that also throws an error that 'this is not a function'.
Link Picker in back office not updating angular $scope
I have added a custom section on the back office to build a short url app and am using dialogService to call the form
In the template, I call a link picker
That function in turn opens a link picker and returns the url value when you select an item from the content tree
This does add the url to $scope.BaseUrl (I've checked by logging it to console) but the angular form doesn't validate, so that field remains ng-pristine and when the form submits that value is null. I've even tried adding the value in in javascript as above. Have tried forcing that field to focus, blur, nothing works.
When I try $scope.$apply() or $digest() it throws the '$apply is already in progress' error. Trying to $SetDirty or anything like that also throws an error that 'this is not a function'.
Can anyone suggest anything?
is working on a reply...