I am trying to give a link at top using Angularjs2 and MVC core
=================app.component.ts======================= import { Component } from '@angular/core'; @Component({ selector: 'pm-app', template: ` <div><nav class='navbar navbar-default'><div class='container-fluid'><a class='navbar-brand'>{{pageTitle}}</a><ul class='nav navbar-nav'><li><a [routerLink]="['/welcome']">Home</a></li><li><a [routerLink]="['/companies','CompanySignUp']">Sign Up</a></li></ul></div></nav><div class='container'><router-outlet></router-outlet></div></div> ` }) export class AppComponent { pageTitle: string = 'Product Management'; }
----------------------CompanySignUp.component.ts-------------------------------------- import { Component, OnInit } from '@angular/core'; import { Company } from './Company'; @Component({ templateUrl: '/Company/SignUp' }) export class CompanySignUpComponent implements OnInit { pageTitle: string = 'Company '; imageWidth: number = 50; imageMargin: number = 2; showImage: boolean = false; listFilter: string; errorMessage: string; toggleImage(): void { this.showImage = !this.showImage; } ngOnInit(): void { } onRatingClicked(message: string): void { this.pageTitle = 'Company : ' + message; } }
C# MVC View
public IActionResult SignUp() { return View(); }
The CompanySignUp.component.ts is located in companies folder under app folder.
Guide me . There is no error throwing by framework.