docs(angular): adds docs to angular API (#17211)

This commit is contained in:
Manu MA
2019-01-22 20:03:47 +01:00
committed by GitHub
parent d3b6e60adf
commit a7a2fc59bf
5 changed files with 165 additions and 14 deletions

View File

@ -182,20 +182,32 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
});
}
canGoBack(deep = 1, stackId?: string) {
/**
* Returns `true` if there are pages in the stack to go back.
*/
canGoBack(deep = 1, stackId?: string): boolean {
return this.stackCtrl.canGoBack(deep, stackId);
}
pop(deep = 1, stackId?: string) {
/**
* Resolves to `true` if it the outlet was able to sucessfully pop the last N pages.
*/
pop(deep = 1, stackId?: string): Promise<boolean> {
return this.stackCtrl.pop(deep, stackId);
}
getLastUrl(stackId?: string) {
/**
* Returns the URL of the active page of each stack.
*/
getLastUrl(stackId?: string): string | undefined {
const active = this.stackCtrl.getLastUrl(stackId);
return active ? active.url : undefined;
}
getActiveStackId() {
/**
* Returns the active stack ID. In the context of ion-tabs, it means the active tab.
*/
getActiveStackId(): string | undefined {
return this.stackCtrl.getActiveStackId();
}
}