Property 'X' is private and only accessible within class 'xyzComponent'

前端 未结 7 1262
逝去的感伤
逝去的感伤 2020-12-07 13:48

I\'m trying to build angular2 application for production for that I\'m following this blog. After my ngc successful compilation when the

7条回答
  •  孤街浪徒
    2020-12-07 14:10

    Maybe another even simpler answer is:

    Guys, please don't call private methods, fields or properties from the HTML :)


    P.S. when compiling the *.ts code to *.js, AOT refuse to connect non-public members with the HTML template.

    And "yes" this will make your build pipeline to fail :D

提交回复
热议问题