# More interfaces? feedback from aurelia 1 for 2

**URL:** <https://discourse.aurelia.io/t/more-interfaces-feedback-from-aurelia-1-for-2/3259>\
**Category:** Help Requests\
**Created:** [February 23, 2020, 7:44pm UTC](https://discourse.aurelia.io/t/more-interfaces-feedback-from-aurelia-1-for-2/3259 "2020-02-23T19:44:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xenoterracide](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/xenoterracide/32/1728_2.png) [@xenoterracide](https://discourse.aurelia.io/u/xenoterracide)\
**Post date:** [February 23, 2020, 7:44pm UTC](https://discourse.aurelia.io/t/more-interfaces-feedback-from-aurelia-1-for-2/3259/1 "2020-02-23T19:44:40Z")

</div>

I know aurelia is convention oriented, but are there more interfaces hiding somewhere? example, I have this

```auto
@connectTo()
@autoinject()
export class App {

  constructor(
    private router: Router,
    private readonly store: Store<State>,
    private readonly stateHolder: StateHolder,
  ) {
  }

  configureRouter(config: RouterConfiguration, router: Router) {
    config.title = 'WarMeister';
    config.map([
      {
        route: ['', 'home'],
        name: 'home',
        viewPorts: {
          main: { moduleId: PLATFORM.moduleName('roster/GameRosterNav') },
        },
      },
      {
        route: 'games',
        name: 'games',
        title: 'Add Game',
        viewPorts: {
          main: { moduleId: PLATFORM.moduleName('game/index') },
        }
      },
// { route: ':user/rosters/:game', name: 'rosters', moduleId: PLATFORM.moduleName('roster/GameRosterNav'), title: 'Roster' },
    ]);

    this.router = router;
  }
  
  async attached() {
    return this.store.state.subscribe((state) => {
      console.log('state', state);
      this.stateHolder.state = state;
    });
  }

```

but what I’d really like is

```auto
@connectTo()
@autoinject()
export class App implements RouterConfigurer, AttachListener {

  constructor(
    private router: Router,
    private readonly store: Store<State>,
    private readonly stateHolder: StateHolder,
  ) {
  }

  configureRouter(config: RouterConfiguration, router: Router) {
    config.title = 'WarMeister';
    config.addRoutes([ // currently .map is very week, and doesn't really say which keys are available and typos are very easy.
      {
        route: ['', 'home'],
        name: 'home',
        viewPorts: {
          main: { moduleId: PLATFORM.moduleName('roster/GameRosterNav') },
        },
      },
      {
        route: 'games',
        name: 'games',
        title: 'Add Game',
        viewPorts: {
          main: { moduleId: PLATFORM.moduleName('game/index') },
        }
      },
// { route: ':user/rosters/:game', name: 'rosters', moduleId: PLATFORM.moduleName('roster/GameRosterNav'), title: 'Roster' },
    ]);

    this.router = router;
  }
  
  async attached() {
    return this.store.state.subscribe((state) => {
      console.log('state', state);
      this.stateHolder.state = state;
    });
  }

```

is this already possible? should I open a bug requesting for v2? would v1 backport patches be welcome?

---

<div class="post-metadata">

**Author:** ![bigopon](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bigopon/32/18_2.png) [@bigopon](https://discourse.aurelia.io/u/bigopon)\
**Post date:** [February 24, 2020, 11:45am UTC](https://discourse.aurelia.io/t/more-interfaces-feedback-from-aurelia-1-for-2/3259/2 "2020-02-24T11:45:53Z")

</div>

Here’re the relevant interfaces for router that you can implement:

> <https://github.com/aurelia/router/blob/master/src/interfaces.ts#L160-L227>

Here’re the ones for templating:

> <https://github.com/aurelia/templating/blob/master/src/interfaces.js>

---

<div class="post-metadata">

**Author:** ![fkleuver](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/fkleuver/32/994_2.png) [@fkleuver](https://discourse.aurelia.io/u/fkleuver)\
**Post date:** [April 14, 2020, 2:24pm UTC](https://discourse.aurelia.io/t/more-interfaces-feedback-from-aurelia-1-for-2/3259/3 "2020-04-14T14:24:01Z")

</div>

> [@xenoterracide](#):
>
> should I open a bug requesting for v2?

We already have exhaustive interfaces in v2 for this sort of thing as well 🙂

---

<div class="post-metadata">

**Author:** ![xenoterracide](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/xenoterracide/32/1728_2.png) [@xenoterracide](https://discourse.aurelia.io/u/xenoterracide)\
**Post date:** [July 28, 2020, 3:16pm UTC](https://discourse.aurelia.io/t/more-interfaces-feedback-from-aurelia-1-for-2/3259/4 "2020-07-28T15:16:31Z")

</div>

yeah, I think in v1 this was just a doc problem.

---

<div class="post-metadata">

**Author:** ![mcorven](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@mcorven](https://discourse.aurelia.io/u/mcorven)\
**Post date:** [July 28, 2020, 4:31pm UTC](https://discourse.aurelia.io/t/more-interfaces-feedback-from-aurelia-1-for-2/3259/5 "2020-07-28T16:31:29Z")

</div>

Until about a year ago when I stumbled onto those source files, I was unaware of these v1 interfaces - I had been creating my own.

---

<div class="post-metadata">

**Author:** ![bigopon](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bigopon/32/18_2.png) [@bigopon](https://discourse.aurelia.io/u/bigopon)\
**Post date:** [September 8, 2020, 12:31pm UTC](https://discourse.aurelia.io/t/more-interfaces-feedback-from-aurelia-1-for-2/3259/6 "2020-09-08T12:31:47Z")

</div>

> I had been creating my own.

😓
