Mithril.js: Optional route parameters

Created on 21 Mar 2017  路  3Comments  路  Source: MithrilJS/mithril.js

Hi guys!

There any way to pass optional route parameters? Something like this...

'/users/:id?': User

Tks!

Question

Most helpful comment

Afraid not, you have to explicitly declare the with and without routes:

{
  '/users'     : User,
  '/users/:id' : User
}

All 3 comments

Afraid not, you have to explicitly declare the with and without routes:

{
  '/users'     : User,
  '/users/:id' : User
}

@volnei Is this good to close now?

Yeap!! Thanks!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

josephys picture josephys  路  4Comments

pygy picture pygy  路  4Comments

dhinesh03 picture dhinesh03  路  4Comments

mke21 picture mke21  路  3Comments

millken picture millken  路  4Comments