Not sure if I'm doing this right, but for some reason my PageSelector (client component) is not persisting the selected value to the database, so it seems. When re-opening the designer, the value is cleared.
This is my code:
>Select a page</
designerModule = angular.module(
For what I understand I would not need to add an AngularJS controller. (as I was told this is created automatically when you don't create one yourself).
Is there something I forget to do?
I experienced the same problem and changing the attributes on the sf-page-selector directive to the following resolved the persistence problem.
binding to the property values instead definitely worked, but only for the simple guid Id type. when I try to bind to the NewsItem property SelectedItem it fails with the error:
There was an error deserializing the object of type Telerik.Sitefinity.Modules.Pages.Web.Services.Model.WcfControlProperty
Documentation says the type should be string but later it says it should be object, but both fail. They suggest that you need to add serialization in a custom controller for the widget designer, but I'm not using one.
So am I correct in assuming that if I want to bind to the SelectedItem object, I am REQUIRED to use a custom controller for the designer? if not, how do I properly serialize the selected value and persist it to the widget property?
$scope.selectedPage = JSON.parse(newValue);
$scope.properties.SelectedPage.PropertyValue = JSON.stringify(newValue);
$scope.selectedPageId = JSON.parse(newValue);
$scope.properties.SelectedPageId.PropertyValue = JSON.stringify(newValue);
When I use "properties.SelectedPage.PropertyValue" it works okay.
I'm going to try your solution also. Thanks for that.