@builder.io/angular Data passing and custom actions not persist in builder.io state
Hello,
I trying to pass data to builder component like this
<builder-component *ngIf="visible"
[data]="data"
[model]="computedModel$ | async"
[options]="optionsCombined"
[reloadOnRoute]="false"
[handleRouting]="true"
[prerender]="false"
[navigationTimeout]="false"
(load)="load($event)"
(route)="routeChanged($event)"
(error)="error($event)">
</builder-component>
The data includes some properties:
data = { myFunc: () => alert('wooow!'), b: 'c'};
But when I tried to read it from the state in builder.io I am getting an error:
Builder custom code error: state.myFunc is not a function in console.log(state.myFunc())

I am 100% it was working fine a few months back.
Note: I am using prerender=flase
Note 2: Not working with "@builder.io/angular": "1.1.10" and "@builder.io/angular": "1.1.11-alpha.2"
We may have a fix for this, going to test it out locally now. I'll update this issue when I have more information.
Thanks @ca136 , waiting for feedback :)
https://github.com/BuilderIO/builder/pull/192 for reference. due to Angular issues it's hard to test with npm linking so still want to make sure it doesn't break anything. Will have a pre-release candidate for you to test hopefully today.
@lyczos can you give this version a try locally or on your dev site and let me know if the function binding and all of your other content rendering works: @builder.io/angular: "1.1.11-alpha.3"
@ca136 After version update inside builder.io editor:

The page is not rendering at all ;(
Got it thanks for testing, do you mind sharing your <builder-component> snippet?
Got it thanks for testing, do you mind sharing your
<builder-component>snippet?
Sure @ca136 , it is already in issue report :)
<builder-component *ngIf="visible" <-- true after route change
[data]="data" <-- { myFunc: () => alert('wooow!'), b: 'c'}
[model]="computedModel$ | async" <-- "page"
[options]="optionsCombined" <-- {cacheSeconds: 1000}
[reloadOnRoute]="false"
[handleRouting]="true"
[prerender]="false"
[navigationTimeout]="false"
(load)="load($event)"
(route)="routeChanged($event)"
(error)="error($event)">
</builder-component>
Ok thanks :D can you give this a shot: @builder.io/angular: 1.1.12-1
@ca136 @builder.io/angular: 1.1.12-1
data = {
please: () => alert('I have a hope it will work!'),
noWay: 'a'
};
In builder:

Output after click event:

I've checked also old versions and it seems to not work too "@builder.io/angular": "1.0.83", so maybe the issue is with some scripts from yours builder.io /dist
@lyczos I took a deeper look at this and the fix looks more complicated than we originally envisioned. We plan on re-writing our Angular SDK in the next couple of weeks, and we can make sure support for this gets into that project. The new version should be a lot simpler, lighter weight and easier to contribute to. Please let us know if you have any questions in the meantime.
@ca136 is this issue resolved?
@ca136, any progress with this issue?