asp.net mvc - How to embed angular2 component in _Layout.cshtml -
i have .netcore/angular2 shop spa app.
there seems 2 ways layout 90% of page html 'template':
- app.component.html or
- _layout.cshtml
i've gone _layout.cshtml has @renderbody() tag display angular stuff.
in _layout.cshtml how can embed 1 of angular2 components. e.g cartsummarycomponent.
<ul class="usermenu"> @html.partial("_loginpartial") <li class="pull-right"><cartsummarycomponent></cartsummarycomponent></li> </ul>
the cartsummarycomponent works ok when in app.component.html template need in _loginpartial.
Comments
Post a Comment