AngularJS 1.7.8 - problems with binding and component

35 views
Skip to first unread message

Valerio

unread,
Sep 4, 2019, 1:41:33 PM9/4/19
to Angular and AngularJS discussion
Hi,
I have a problem with bindings with components.

Two-way parameter will be not available on $onInit hook.

I reproduced the problem in this PLNKR

Sander Elias

unread,
Sep 5, 2019, 12:47:47 AM9/5/19
to Angular and AngularJS discussion
Hi Valerio,

It is available, however, you are breaking the reference when you reassign `response.data` directly to `$scope.Object`
try
Object.assign($scope.Object, response.data)
instead.

There might be more issues, but this was the first one that caught my eye.

Regards
Sander
Reply all
Reply to author
Forward
0 new messages