Skip to content
An Aurelia plugin which adds the ability to control footer content via the router
TypeScript JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aurelia_project
dev-app
dist
src
test
.gitignore
CHANGELOG.md
LICENSE
README.md
index.html
karma.conf.js
package.json
tsconfig.json
tslint.json
yarn.lock

README.md

aurelia-routed-footer

Usage

Place a footer-view element in your top level view. The footer-view requires either the default-module or default-view property to be set. The default view/module(viewmodel) is used when no footer is specified in the route hierarchy. e.g.

<footer-view default-view="./views/emptyfooter.html"></footer-view>

To replace the default footer, just add a footer: /path/to/module property to the route config when configuring the router. The following example switches the footer for the Edit route:

configureRouter(config, router){
    config.map([
      { route: '',    title: 'Search',  moduleId: 'viewmodels/search',  nav: true },
      { route: ':id', title: 'Edit',    moduleId: 'viewmodels/edit',    nav: false, footer: 'viewmodels/editfooter' }
    ]);

    this.router = router;
  }

If the footer module defines an activate() callback, the same activation context that is passed to the primary slot the router is activating will be passed to the footer callback.

You can’t perform that action at this time.