You can disable binding expression type checking using $any() type cast function(by surrounding the expression). In the following example, the error Property contacts does not exist is suppressed by casting user to the any type.
1 | template: '{{$any(user).contacts.email}}' |
The $any()
cast function also works with this to allow access to undeclared members of the component.
1 | template: '{{$any(this).contacts.email}}' |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.