ComponentRef.destroy()不应用自定义动画,因为组件被破坏了

时间:2018-06-21 13:05:42

标签: angular typescript

我正在通过动态创建的组件在destroy()实例上调用ComponentRef,并且未应用我的自定义Angular动画。

在销毁常规组件时会应用它们,那么为什么在手动创建/销毁组件时不应用它们呢?还有其他API吗?

引用此类:

/**
 * Represents an instance of a Component created via a {@link ComponentFactory}.
 *
 * `ComponentRef` provides access to the Component Instance as well other objects related to this
 * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}
 * method.
 * @stable
 */
export declare abstract class ComponentRef<C> {
    // Other properties...

    /**
     * Destroys the component instance and all of the data structures associated with it.
     */
    abstract destroy(): void;
}

0 个答案:

没有答案
相关问题