Aurelia: can't find name of Route
<p>I am trying to navigate to a route as follows:</p>

<p>add.js:</p>

<pre><code>import {HttpClient} from "aurelia-http-client";
import $ from "jquery";
import {Router} from "aurelia-router";

const baseURI = "/posts";

export class Add {

    constructor() {
        this.router = new Router();
    }

    add() {
        let url = this.router.generate("home");
        this.router.navigate(url);
    }
}
</code></pre>

<p>app.js: </p>

<pre><code>configureRouter(config, router) {
    this.router = router;
    config.map([
        {
            route: ["", "home"],
            moduleId: "./home",
            title: "Home",
            name: "home",
            nav: true
        },
        {
            route: "add",
            moduleId: "./add",
            title: "Add New Post",
            name: "Add",
            nav: true
        }
    ]);
}
</code></pre>

<p>I am getting this error: <code>A route with name 'home' could not be found. Check that name: 'home' was specified in the route's config.</code> </p>

<p>Is it because the route for home is in an array? I tried separating "" and "home" but the error remains.</p>