carbon-components-angular
Version:
Next generation components
53 lines (49 loc) • 2.09 kB
TypeScript
/**
*
* carbon-angular v0.0.0 | placeholder.service.d.ts
*
* Copyright 2014, 2025 IBM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ComponentRef, ViewContainerRef, Injector, EnvironmentInjector } from "@angular/core";
import * as i0 from "@angular/core";
/**
* Singleton service used to register the container for out-of-flow components to insert into.
* Also used to insert/remove components from that view.
*/
export declare class PlaceholderService {
/**
* Main `ViewContainerRef` to insert components into
*/
protected viewContainerRef: ViewContainerRef;
/**
* Map of id's to secondary `ViewContainerRef`s
*/
protected viewContainerMap: Map<any, ViewContainerRef>;
/**
* Used by `Placeholder` to register view-container reference.
*/
registerViewContainerRef(vcRef: ViewContainerRef, id?: any): void;
/**
* Creates and returns component in the view.
*/
createComponent(component: ComponentRef<any>, injector: Injector, id?: any, environment?: EnvironmentInjector): ComponentRef<any>;
destroyComponent(component: ComponentRef<any>): void;
hasComponentRef(component: ComponentRef<any>, id?: any): boolean;
hasPlaceholderRef(id?: any): boolean;
appendElement(element: HTMLElement, id?: any): HTMLElement;
removeElement(element: HTMLElement, id?: any): HTMLElement;
hasElement(element: HTMLElement, id?: any): boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<PlaceholderService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<PlaceholderService>;
}