Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
573 views
in Technique[技术] by (71.8m points)

angular - Error: Cannot match any routes. URL Segment: 'undefined'

html code

<div class="section-layout text-center">
                <a [routerLink]="[pricing]" class="btn btn-primary my-5">Upgrade</a>
            </div>

hi ,when i try to login and its this upgrade button its navigating me to (https://dev.socialtools.me/Plans-and-Pricing-Application-on-Facebook) this url and letter if i refresh the page and try to click on this button its giving me an error

Error: Cannot match any routes. URL Segment: 'undefined' https://dev.socialtools.me/undefined)

question from:https://stackoverflow.com/questions/65949831/error-cannot-match-any-routes-url-segment-undefined

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Assuming pricing is route not variable

[routerLink]="[/'pricing']"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...