fix(nav): view.id is not overridden

fixes #8794
This commit is contained in:
Manu Mtz.-Almeida
2016-10-20 22:06:43 +02:00
parent 780717e3d5
commit 8b65398044
2 changed files with 13 additions and 1 deletions

View File

@ -689,7 +689,10 @@ export class NavControllerBase extends Ion implements NavController {
view._setNav(this);
// give this inserted view an ID
view.id = this.id + '-' + (++this._ids);
this._ids++;
if (!view.id) {
view.id = `${this.id}-${this._ids}`;
}
// insert the entering view into the correct index in the stack
this._views.splice(index, 0, view);