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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -