0

I am getting a parsing error when compiling my angular 2 app (version 2.4.1)

assets/app/app.component.ts(13,42): error TS1125: Hexadecimal digit expected

the code is

<ul>                   
    <li><a routerLink='\usaddchild'>Add Child</a></li>
</ul>
<router-outlet></router-outlet>

and the line is specific that is causing issues is below

<li><a routerLink='\usaddchild'>Add Child</a></li>

there seems to be an an issue with the \us.

Any ideas?

1 Answer 1

2

Your slashes is in the wrong direction. Correct:

<li><a routerLink='/usaddchild'>Add Child</a></li>

https://angular.io/docs/ts/latest/guide/router.html

Angular2 thinks it's some kind of unicode character, which do start with \u: http://www.rapidtables.com/code/text/unicode-characters.htm

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.