The beforeDestroy() method should return a promise that always resolves. By default the beforeDestroy() method should not be defined in any new JavaScript/TypeScript files and the default defined on the base Module class should be:
public beforeDestroy():Promise<unknown>{
return Promise.resolve();
}
That way when we need to actually do something (such as an animation) we can allow the developer to do what they need to do before resolving the promise, see example below.
The
beforeDestroy()
method should return a promise that always resolves. By default thebeforeDestroy()
method should not be defined in any new JavaScript/TypeScript files and the default defined on the baseModule
class should be:That way when we need to actually do something (such as an animation) we can allow the developer to do what they need to do before resolving the promise, see example below.