2

Worked on my project 3d ago. after that just pushed it into my repo. Today i cloned repo and install dependencies. If early it worked good today i have bunch of errors.

When i trying to get sell <a routerLink="/sell">Sell</a> page by url -> localhost:3000/sell

const appRoutes: Routes = [
{
  path: '',
  component: MainPageComponent
},
{
  path: 'sell',
  component: SellComponent  }
];

I'm getting this error error image

Note: It worked till this day. Thanks for help

3
  • I don't think the error is in the code. You should add , pathMatch: 'full' to the first (empty path) route though if it is not a redirect and doesn't have child routes. Commented Dec 20, 2016 at 9:20
  • wow it solve my problem leave answer i'll mark Commented Dec 20, 2016 at 9:21
  • Didn't really expect that either :D Commented Dec 20, 2016 at 9:22

1 Answer 1

1

You should add , pathMatch: 'full' to the first (empty path) route though if it is not a redirect and doesn't have child routes.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.