visionmedia/express — Issue #891: Mounted App this.get('root') == '/'?
Author: slaskis
Created: 2011-11-14 09:10:41+00:00
State: open

Maybe it's too early for bug reports regarding express 3.x but I found that the root of a mounted app doesn't seem to add the route name (as defined by [this code](https://github.com/visionmedia/express/blob/master/lib/application.js#L214-221)).

This has the side effects that the view lookup requires me to 'hard code' the view paths of the mounted app.

See this little test:

```
var express = require('express')
, assert = require('assert');

var child = express();
child.mounted(function(parent){
assert.equal(parent.get('root'), '/')
assert.equal(this.route, '/child')
assert.equal(this.get('root'), '/child') // => AssertionError: "/" == "/child"
})

var parent = express();
parent.use('/child',child)
```

But I'm uncertain if this is the expected behaviour, in which case you can just close this issue...