-
Notifications
You must be signed in to change notification settings - Fork 138
Closed
Description
It would be nice with separate interface exports for the hooks, and with a nice naming, such as:
export interface MyComponent implements OnUiExit {
uiCanExit(newTransition?: Transition): HookResult {
}
}
As it is right now the NG2Component interface really does not add any declarative meaning for a person using the framework, imho:
export interface MyComponent implements Ng2Component {
}
I don't get why a user-exposed interface has this design with all optional methods. I feel that its better to have one interface per hook and not use the optional (?) syntax.
export interface Ng2Component extends Component {
uiOnParamsChanged?(newParams: {
[paramName: string]: any;
}, trans?: Transition): void;
uiCanExit?(newTransition?: Transition): HookResult;
}
Any chance of getting this? I could create my own interfaces, but feel it's better if it's in the framework. Thanks.
wilmarques and mse283
Metadata
Metadata
Assignees
Labels
No labels