mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
18 lines
330 B
TypeScript
18 lines
330 B
TypeScript
|
|
/**
|
|
* Map of possible views that can be navigated to using an Ionic NavController
|
|
*/
|
|
export class NavRegistry {
|
|
constructor(views=[]) {
|
|
this._views = new Map(views.map(view => [view.name, view]));
|
|
}
|
|
|
|
get(viewName) {
|
|
return this._views.get(viewName);
|
|
}
|
|
|
|
set(view) {
|
|
this._views.set(view.name, view);
|
|
}
|
|
}
|