set up two different routes with when method

to set up the two different routes the when method will be used on
route provider. when takes two inputs. the first is the path. and the
second is an object that defines the additional properties of this
route