I'm following the emberjs tutorial and I am getting an error when adding a <LinkTo>
tag. I'm not sure what it means as I can't find any documentation what I need to do to properly construct this tag.
What do I need to do to construct this properly? It doesn't render on the page.
Here is my environment:
ember-cli: 3.6.1
node: 13.12.0
os: darwin x64
Here is the error in the console:
Error: Assertion Failed: You must provide one or more parameters to the link-to component.
Here are the relevant code snippets
app/templates/index.hbs
<div class="jumbo">
<div class="right tomster"></div>
<h2>Welcome to Super Rentals!</h2>
<p>We hope you find exactly what you're looking for in a place to stay.</p>
<LinkTo @route="about">About</LinkTo>
</div>
app/router.js
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
export default class Router extends EmberRouter {
location = config.locationType;
rootURL = config.rootURL;
}
Router.map(function() {
this.route('about');
});
Aucun commentaire:
Enregistrer un commentaire