
Security News
Google’s OSV Fix Just Added 500+ New Advisories — All Thanks to One Small Policy Change
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
@ibm-wch-sdk/ng
Advanced tools
Software development kit to simplify the development of Angular based single page applications against Watson Content Hub.
This module represents a software development kit (SDK) that can be used by Angular 4 based applications to build single page applications (SPA) against Watson Content Hub (WCH) managed pages.
npm install --save @ibm-wch-sdk/ng
Refer to the documentation.
The SDK defines one top level module module for use in the application component.
imports: [
...
WchNgModule.forRoot({ apiUrl: new URL(apiUrl), deliveryUrl: new URL(deliveryUrl) })
...
]
Building an application for WCH involves a client side and a server side step. During the server side step you create your content in WCH. During the client side step you build your Angular 4 application that consumers the content.
Please refer to the Server Side Setup instructions.
First install angular-cli using
npm install -g @angular/cli
Bootstrap your angular application
ng new PROJECT-NAME
cd PROJECT-NAME
Install the WCH SDK and its peer dependencies:
npm install --save @ibm-wch-sdk/ng
Create angular components for the layouts defined during the server setup.
ng g component layouts/MY_COMPONENT
Add a layout selector to your component. The selector creates the connection between the layout identifier and the angular component. In addition it is convenient (but not required) to subclass your new component from AbstractRenderingComponent. Make the following changes to the MY_COMPONENT.ts
file created in the step before:
import { LayoutComponent, AbstractRenderingComponent } from '@ibm-wch-sdk/ng';
@LayoutComponent({
selector: ['MY_COMPONENT_SELECTOR']
})
@Component({
...
})
export class MyComponent extends AbstractRenderingComponent {
constructor() {
super();
}
}
Make sure to add your new layout to the set of entry components of the main module, because the component will be instantiated dynamically:
@NgModule({
...
entryComponents: [MyComponent, ...],
...
})
export class AppModule {
}
You will typically run your application in local development mode, first. Configure it to use the WCH server and tenant of your choice as the backend service. Do this by adding the configured WchModule to the main application module. A convenient way to configure this module is via the environment
config file. The CLI will automatically select the correct file depending on your development environment (e.g. dev
vs. production
).
import { WchModule } from '@ibm-wch-sdk/ng';
import { environment } from '../environments/environment';
...
@NgModule({
...
imports: [
...
WchNgModule.forRoot(environment)
...
]
})
export class AppModule {
}
The content of the environment file for local development might look like this:
const HOSTNAME = 'dch-dxcloud.rtp.raleigh.ibm.com';
const TENANT_ID = '7576818c-ca11-4b86-b03d-333313c4f0ad';
export const apiUrl = `http://${HOSTNAME}/api/${TENANT_ID}`;
export const environment = {
production: false,
apiUrl
};
In a last step you'll add routing to the application. The easiest way is to configure all routes to be served by WCH pages. For this create the following router config and add it to your main application module:
import { PageComponent } from '@ibm-wch-sdk/ng';
...
import { RouterModule, Routes } from '@angular/router';
...
const appRoutes: Routes = [
{
path: '',
redirectTo: '/home',
pathMatch: 'full'
},
{
path: '**',
component: PageComponent
}
];
@NgModule({
...
imports: [
RouterModule.forRoot(appRoutes),
...
]
})
export class AppModule {
}
Start your local development server and enjoy:
ng serve
Add the file .npmrc
to your application folder:
registry = http://wats-repob.devlab.ibm.com
@request:registry=https://registry.npmjs.org/
@types:registry=https://registry.npmjs.org/
@angular:registry=https://registry.npmjs.org/
@ngtools:registry=https://registry.npmjs.org/
onOnInit
and onOnDestroy
have replay semantics, i.e. they fire for each consumer that attaches to the hooks.ComponentOutput
events. Use the component events and subscribe to the component instance, instead.rxjs 6.x
, all rx related code has to use the new imports@ibm-wch-sdk/
namespaceInjectorService
since dependency injection should NOT be done via Injector
classes, directlyContentResolver
service to support manual resolution of lazy loaded contentRouter
componentgroup
elementsContentWithLayout
to ContentItemWithLayout
.ibm-wch-sdk-api
and the implementation module ibm-wch-sdk-ng
. No breaking change expected, since the API is re-exported by the implementation module. I recommend however to reference the exports from the API module rather than those from the implementation module.SearchService
luceneEscapeTerm
and luceneEscapeKeyValue
methods to simplify the generation of search queriesoptionselection
elements4.3.0
.WchLoggerService
WchInfoService
describeSetter
in 'AbstractLifeCycleComponent'[wchEditable]
directivelevels
parameter in wch-contentref
The main SDK module exposes the components and services to be used by the application. Have a look at development stories for an explanation of usecases.
imports: [
...
WchNgModule.forRoot({ apiUrl: new URL(apiUrl), deliveryUrl: new URL(deliveryUrl) })
...
]
Add the module to your main application module using the forRoot
accessor method. The context passed to the accessor defines the entry URLs into WCH.
For your convenience you can also keep the URLs as part of the environment
properties. In this case pass the environment directly to the forRoot
method and declare the urls as part of the environment object, e.g.
import { environment } from '../environments/environment';
...
imports: [
...
WchNgModule.forRoot(environment)
],
with an environment properties file like this:
export const environment = {
production: false,
apiUrl: new URL(apiUrl),
deliveryUrl: new URL(deliveryUrl)
};
When developing modules that use the SDK, make sure to import the WchNgComponentsModule to have access to the components and directives exposed by the SDK.
The layout decorator allow to assign a layout name to a component.
@LayoutComponent({
selector: 'one-column'
})
@Component({
selector: 'app-one-column',
...
})
export class OneColumnComponent extends AbstractRenderingComponent implements OnInit, OnDestroy {
or
@LayoutComponent()
@Component({
selector: 'app-one-column',
...
})
export class OneColumnComponent extends AbstractRenderingComponent implements OnInit, OnDestroy {
selector
: the name of the layout. This matches the controller field in the layout descriptor. If this property is missing, then the selector of the component will be used as a fallback. The type of this field can be string
or string[]
. In the array form, all selectors in the array will be associated with the component.mappingId?
: the optional mapping ID defines a fallback layout mapping, if no layout could be determined via WCH configuration. The ID carries either a content ID, a type ID or a type name.layoutMode?
: the optional layout mode defines the mode that the fallback mapping applies to.You can leave out the selector property on the LayoutComponent
decorator. In this case the selector of the Component
will be used as the name of the layout.
The layout mapping decorator allows to register fallback layout mappings as decorations of a class.
id
: defines a fallback layout mapping, if no layout could be determined via WCH configuration. The ID carries either a content ID, a type ID or a type name.selector
: the selector of the layout, either a string or a type. If the selector is missing, we use the attached classlayoutMode?
: the optional layout mode defines the mode that the fallback mapping applies to.The following example maps an ID of a content item to the HeroGridComponent
layout in the default layout mode:
@LayoutMapping('e2ab99d1-9f9c-49a3-a80e-ec45c7748820', HeroGridComponent)
class ...
The context binding allows to attach a property of the rendering context to an instance variable of the component. This will often improve the readability of the template.
@LayoutComponent(...)
@Component(...)
export class OneColumnComponent extends AbstractRenderingComponent {
@RenderingContextBinding('elements.text.value', 'defaultValue')
textValue: string;
}
selector
: the selector is a simple dot notation expresssion for the desired property, relative to the rendering context. Note that this does NOT support array expressions (yet). Optionally you may also pass a function that takes a rendering
context as input and returns the desired value.default
: an optional default value that will be used if the rendering context does not contain the elementThe binding assumes the existence of a onRenderingContext
observable on the class. This is automatically the case if the class inherits from AbstractRenderingComponent.
Component that can be used as a super class for custom components such as layouts. The component exposes a setter for the RenderingContext in a format that is expected by the ContentrefComponent.
renderingContext
: the current rendering contextlayoutMode
: the current layout modetrackByComponentId
: method to be used with the *ngFor directive when iterating over RenderingContext references. The method returns the ID of the rendering context, allowing Angular to correlate updates of the list.onRenderingContext
: fires when the rendering context changesonLayoutMode
: fires when the layout mode changesBoth the onRenderingContext
and the onLayoutMode
observables will complete when the component is destroyed (i.e. in the course of processing the ngOnDestroy method). This implies that subscribers attached to theses observables do NOT need to unsubscribe explicitly, if they wish their subscription to last for the duration of the lifetime of the component (see section Subscribing and Unsubscribing in the observable contract).
Component that offers observables that will be fired when one of the lifecycle methods is invoked. This can be used as an alternative to override the respective method on the class. The mechanism is useful because:
ngOnDestroy
method to avoid memory leaks. Using a life cycle callback this can be easily done inside the constructor.ngXXX
: the original life cycle method exposed by Angular. Subclasses that want to override these methods MUST call the super method.onXXX
: getter for an observable for this lifecycle method.unsubscribeOnDestroy(subscription)
: registers a subscription to be unsubscribed for in ngOnDestroy
safeSubscribe(observable, handler)
: subscribes to an observable and registers the resulting subscription with ngOnDestroy
. This is the most convenient way to handle subscriptions.The page component resolves the current route to the component (or page) that is associated to this route in WCH. It can therefore be considered a proxy component that decouples the application at build time from the runtime artifacts.
The component does not require any specific configuration, it attaches itself to the routing logic via dependency injection.
Usage in HTML:
<wch-page></wch-page>
Usage in the router config:
const appRoutes: Routes = [
{
path: '**',
component: PageComponent
}
];
layoutMode
: optionally pass the layout mode to be used when rendering the page. If not specified, the system uses the default mode.onRenderingContext
: the rendering context for the page as soon as it has been loadedonLayoutMode
: the layout mode used to render this page.If the page cannot be decoded, the system will look for a component mapped to the PAGE_NOT_FOUND_LAYOUT layout and instantiates this with an empty rendering context.
The page component uses the URL Slug
managed in WCH with each page to decode the targeted page. The URL slugs form a hierarchical namespace that matches the URL namespace of the SPA. The component uses the url
property of the ActivatedRoute. This property represents the sequence of path segments that will be matched against the defined URL slugs. The component will NOT interpret the parent router, so the SPA can decide to mount the WCH namespace at any location within its own namespace.
@ibm-wch-sdk/ng > "components/content/content.component"
Ƭ ComponentState: [RenderingContext
, string
]
Defined in components/content/content.component.ts:30
Combines the active pieces of the state into one single object
<Const>
LOGGER● LOGGER: "ContentComponent" = "ContentComponent"
Defined in components/content/content.component.ts:25
@ibm-wch-sdk/ng > "components/contentquery/contentquery.component"
<Const>
LOGGER● LOGGER: "ContentQueryComponent" = "ContentQueryComponent"
Defined in components/contentquery/contentquery.component.ts:42
@ibm-wch-sdk/ng > "components/contentref/contentref.component"
Ƭ ComponentState: [ComponentTypeRef
<any
>, RenderingContext
, string
]
Defined in components/contentref/contentref.component.ts:80
Combines the active pieces of the state into one single object
<Const>
LOGGER● LOGGER: "ContentrefComponent" = "ContentrefComponent"
Defined in components/contentref/contentref.component.ts:27
▸ getType(aId: string
, aLayoutMode: string
| undefined
, aRenderingContext: RenderingContext
, aCmp: ComponentsService, aMapping: LayoutMappingService): Observable
<ComponentTypeRef
<any
>>
Defined in components/contentref/contentref.component.ts:48
Parameters:
Name | Type |
---|---|
aId | string |
aLayoutMode | string | undefined |
aRenderingContext | RenderingContext |
aCmp | ComponentsService |
aMapping | LayoutMappingService |
Returns: Observable
<ComponentTypeRef
<any
>>
<Const>
LAYOUT_NOT_FOUND_LAYOUTLAYOUT_NOT_FOUND_LAYOUT: object
Defined in components/contentref/contentref.component.ts:33
● template: string
= ComponentsService.DEFAULT_LAYOUT
Defined in components/contentref/contentref.component.ts:35
● templateType: string
= LAYOUT_TYPE_ANGULAR
Defined in components/contentref/contentref.component.ts:34
<Const>
PAGE_NOT_FOUND_LAYOUTPAGE_NOT_FOUND_LAYOUT: object
Defined in components/contentref/contentref.component.ts:29
● template: string
= ComponentsService.PAGE_NOT_FOUND_LAYOUT
Defined in components/contentref/contentref.component.ts:31
● templateType: string
= LAYOUT_TYPE_ANGULAR
Defined in components/contentref/contentref.component.ts:30
@ibm-wch-sdk/ng > "components/default/default.component"
@ibm-wch-sdk/ng > "components/page/page.component"
Ƭ ComponentState: [RenderingContext
, string
]
Defined in components/page/page.component.ts:139
Combines the active pieces of the state into one single object
<Const>
LOGGER● LOGGER: "PageComponent" = "PageComponent"
Defined in components/page/page.component.ts:23
<Const>
_EMPTY_VALUE● _EMPTY_VALUE: ""
= ""
Defined in components/page/page.component.ts:27
<Const>
_META_NAME_DESCRIPTION● _META_NAME_DESCRIPTION: "description" = "description"
Defined in components/page/page.component.ts:26
<Const>
_META_NAME_ID● _META_NAME_ID: "id" = "id"
Defined in components/page/page.component.ts:25
▸ _boxValue(aValue?: string
): string
Defined in components/page/page.component.ts:34
Parameters:
Name | Type |
---|---|
Optional aValue | string |
Returns: string
▸ _getDescription(aSitePage: SitePage
, aRenderingContext: RenderingContext
): string
Defined in components/page/page.component.ts:92
Parameters:
Name | Type |
---|---|
aSitePage | SitePage |
aRenderingContext | RenderingContext |
Returns: string
▸ _getTitle(aSitePage: SitePage
, aRenderingContext: RenderingContext
): string
Defined in components/page/page.component.ts:69
Parameters:
Name | Type |
---|---|
aSitePage | SitePage |
aRenderingContext | RenderingContext |
Returns: string
▸ _setMetaTag(aMetaService: Meta
, aId: string
, aValue?: string
): void
Defined in components/page/page.component.ts:45
Parameters:
Name | Type |
---|---|
aMetaService | Meta |
aId | string |
Optional aValue | string |
Returns: void
▸ _setTitleTag(aTitle: Title
, aValue?: string
): void
Defined in components/page/page.component.ts:56
Parameters:
Name | Type |
---|---|
aTitle | Title |
Optional aValue | string |
Returns: void
▸ _updateMetaData(aContext: RenderingContext
, aTitleService: Title
, aMetaService: Meta
): void
Defined in components/page/page.component.ts:110
Parameters:
Name | Type |
---|---|
aContext | RenderingContext |
aTitleService | Title |
aMetaService | Meta |
Returns: void
@ibm-wch-sdk/ng > "components/pageref/pageref.component"
Ƭ ComponentState: [RenderingContext
, string
]
Defined in components/pageref/pageref.component.ts:28
Combines the active pieces of the state into one single object
<Const>
LOGGER● LOGGER: "PagerefComponent" = "PagerefComponent"
Defined in components/pageref/pageref.component.ts:23
@ibm-wch-sdk/ng > "components/path/content.path.component"
Ƭ ComponentState: [RenderingContext
, string
]
Defined in components/path/content.path.component.ts:20
Combines the active pieces of the state into one single object
<Const>
LOGGER● LOGGER: "ContentPathComponent" = "ContentPathComponent"
Defined in components/path/content.path.component.ts:15
@ibm-wch-sdk/ng > "components/rendering/abstract-base.component"
<Let>
ID● ID: number
= 0
Defined in components/rendering/abstract-base.component.ts:21
<Const>
LOGGER● LOGGER: "AbstractBaseComponent" = "AbstractBaseComponent"
Defined in components/rendering/abstract-base.component.ts:19
@ibm-wch-sdk/ng > "components/rendering/abstract-rendering.component"
<Let>
ID● ID: number
= 0
Defined in components/rendering/abstract-rendering.component.ts:25
<Const>
LOGGER● LOGGER: "AbstractRenderingComponent" = "AbstractRenderingComponent"
Defined in components/rendering/abstract-rendering.component.ts:23
@ibm-wch-sdk/ng > "components/rendering/abstract.lifecycle.component"
Ƭ Registry: any
[][]
Defined in components/rendering/abstract.lifecycle.component.ts:49
<Const>
FIELD_CALLBACKS● FIELD_CALLBACKS: 1
= 1
Defined in components/rendering/abstract.lifecycle.component.ts:46
<Const>
FIELD_OBSERVABLE● FIELD_OBSERVABLE: 2
= 2
Defined in components/rendering/abstract.lifecycle.component.ts:47
<Const>
HOOK_AFTERCONTENTCHECKED● HOOK_AFTERCONTENTCHECKED: 2
= 2
Defined in components/rendering/abstract.lifecycle.component.ts:39
<Const>
HOOK_AFTERCONTENTINIT● HOOK_AFTERCONTENTINIT: 3
= 3
Defined in components/rendering/abstract.lifecycle.component.ts:40
<Const>
HOOK_AFTERVIEWCHECKED● HOOK_AFTERVIEWCHECKED: 0
= 0
Defined in components/rendering/abstract.lifecycle.component.ts:37
Enumeration of the possible hooks
<Const>
HOOK_AFTERVIEWINIT● HOOK_AFTERVIEWINIT: 1
= 1
Defined in components/rendering/abstract.lifecycle.component.ts:38
<Const>
HOOK_CHANGES● HOOK_CHANGES: 6
= 6
Defined in components/rendering/abstract.lifecycle.component.ts:43
<Const>
HOOK_DESTROY● HOOK_DESTROY: 7
= 7
Defined in components/rendering/abstract.lifecycle.component.ts:44
<Const>
HOOK_DOCHECK● HOOK_DOCHECK: 4
= 4
Defined in components/rendering/abstract.lifecycle.component.ts:41
<Const>
HOOK_INIT● HOOK_INIT: 5
= 5
Defined in components/rendering/abstract.lifecycle.component.ts:42
<Const>
KEY_REGISTRY● KEY_REGISTRY: string
| symbol
= createSymbol()
Defined in components/rendering/abstract.lifecycle.component.ts:52
▸ _addHook(aHookIdentifier: number
, aThis: AbstractLifeCycleComponent, aHook: Function
): void
Defined in components/rendering/abstract.lifecycle.component.ts:154
Registers a life cycle hook with the component
Parameters:
Name | Type |
---|---|
aHookIdentifier | number |
aThis | AbstractLifeCycleComponent |
aHook | Function |
Returns: void
▸ _assertCallbacks(aHook: any
[]): Function
[]
Defined in components/rendering/abstract.lifecycle.component.ts:84
Makes sure we have a callbacks array defined
Parameters:
Name | Type | Description |
---|---|---|
aHook | any [] | the hook structure |
Returns: Function
[]
the callback field
▸ _assertHook(aHookIdentifier: number
, aThis: AbstractLifeCycleComponent): any
[]
Defined in components/rendering/abstract.lifecycle.component.ts:70
Makes sure we have a hook data structure for the identifier
Parameters:
Name | Type | Description |
---|---|---|
aHookIdentifier | number | the hook identifier |
aThis | AbstractLifeCycleComponent | the instance |
Returns: any
[]
the hook structure
▸ _createObservable(aHookIdentifier: number
, aHook: any
[], aShared: boolean
, aThis: AbstractLifeCycleComponent): Observable
<any
>
Defined in components/rendering/abstract.lifecycle.component.ts:97
Construct the desired observable
Parameters:
Name | Type | Description |
---|---|---|
aHookIdentifier | number | the hook |
aHook | any [] | |
aShared | boolean | |
aThis | AbstractLifeCycleComponent | the life cycle component |
Returns: Observable
<any
>
the observable
▸ _getObservable(aHookIdentifier: number
, aShared: boolean
, aThis: AbstractLifeCycleComponent): Observable
<any
>
Defined in components/rendering/abstract.lifecycle.component.ts:132
Registers an observable for a hook
Parameters:
Name | Type | Description |
---|---|---|
aHookIdentifier | number | the identifier for the hook |
aShared | boolean | |
aThis | AbstractLifeCycleComponent | the instance of the component |
Returns: Observable
<any
>
the observable
▸ _invokeHooks(aHookIdentifier: number
, aThis: AbstractLifeCycleComponent, aArgs: IArguments
): void
Defined in components/rendering/abstract.lifecycle.component.ts:171
Invokes the lifecycle hooks for the component
Parameters:
Name | Type | Description |
---|---|---|
aHookIdentifier | number | |
aThis | AbstractLifeCycleComponent | the this pointer |
aArgs | IArguments | the arguments |
Returns: void
▸ _removeRegistry(aThis: AbstractLifeCycleComponent): void
Defined in components/rendering/abstract.lifecycle.component.ts:59
Clears the registry from the component
Parameters:
Name | Type | Description |
---|---|---|
aThis | AbstractLifeCycleComponent | the instance |
Returns: void
▸ createGetter<T
>(aObservable: Observable
<T
>, aThis: AbstractLifeCycleComponent, aInitial?: T
): PropertyDescriptor
Defined in components/rendering/abstract.lifecycle.component.ts:451
Constructs a getter that subscribes to a value
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aObservable | Observable <T > | the observable |
aThis | AbstractLifeCycleComponent | the component |
Optional aInitial | T | the optional initial value |
Returns: PropertyDescriptor
the descriptor
▸ createSetter<T
>(aSubject: Subject
<T
>, aThis: AbstractLifeCycleComponent): PropertyDescriptor
Defined in components/rendering/abstract.lifecycle.component.ts:432
Constructs a setter that is unregistered automatically in onDestroy
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSubject | Subject <T > | the subject |
aThis | AbstractLifeCycleComponent | the component |
Returns: PropertyDescriptor
the descriptor
@ibm-wch-sdk/ng > "components/site/site.component"
<Const>
LOGGER● LOGGER: "SiteComponent" = "SiteComponent"
Defined in components/site/site.component.ts:11
@ibm-wch-sdk/ng > "decorators/bootstrap/rendering.context.bootstrap.decorator"
▸ ContentWithLayoutBootstrap(aDirective?: ContentWithLayoutBootstrapDirective): function
Defined in decorators/bootstrap/rendering.context.bootstrap.decorator.ts:11
Parameters:
Name | Type |
---|---|
Optional aDirective | ContentWithLayoutBootstrapDirective |
Returns: function
@ibm-wch-sdk/ng > "decorators/bootstrap/rendering.context.bootstrap.directive"
@ibm-wch-sdk/ng > "decorators/bootstrap/site.bootstrap.decorator"
<Const>
LOGGER● LOGGER: "SiteBootstrap" = "SiteBootstrap"
Defined in decorators/bootstrap/site.bootstrap.decorator.ts:8
▸ SiteBootstrap(aDirective?: SiteBootstrapDirective): function
Defined in decorators/bootstrap/site.bootstrap.decorator.ts:15
Parameters:
Name | Type |
---|---|
Optional aDirective | SiteBootstrapDirective |
Returns: function
@ibm-wch-sdk/ng > "decorators/bootstrap/site.bootstrap.directive"
@ibm-wch-sdk/ng > "decorators/layout/layout.decorator"
Ƭ ExpressionGetter: function
Defined in decorators/layout/layout.decorator.ts:355
▸(): string
Returns: string
Ƭ Subscriptions: Subscription
[]
Defined in decorators/layout/layout.decorator.ts:54
<Const>
KEY_EXPRESSION● KEY_EXPRESSION: "45b01348-de92-44a0-8103-7b7dc471ad8c" = "45b01348-de92-44a0-8103-7b7dc471ad8c"
Defined in decorators/layout/layout.decorator.ts:52
<Const>
KEY_OBSERVABLE_PREFIX● KEY_OBSERVABLE_PREFIX: "on" = "on"
Defined in decorators/layout/layout.decorator.ts:47
<Const>
KEY_ON_DESTROY● KEY_ON_DESTROY: "ngOnDestroy" = "ngOnDestroy"
Defined in decorators/layout/layout.decorator.ts:48
<Const>
KEY_SUBSCRIPTIONS● KEY_SUBSCRIPTIONS: string
| symbol
= createSymbol()
Defined in decorators/layout/layout.decorator.ts:49
<Const>
LOGGER● LOGGER: "LayoutDecorator" = "LayoutDecorator"
Defined in decorators/layout/layout.decorator.ts:44
<Const>
UNDEFINED_RENDERING_CONTEXT_SUBJECT● UNDEFINED_RENDERING_CONTEXT_SUBJECT: BehaviorSubject
<RenderingContext
> = new _BehaviorSubject(
UNDEFINED_RENDERING_CONTEXT
)
Defined in decorators/layout/layout.decorator.ts:165
<Const>
_BehaviorSubject● _BehaviorSubject: BehaviorSubject
= BehaviorSubject
Defined in decorators/layout/layout.decorator.ts:45
<Const>
_SYMBOLS● _SYMBOLS: Record
<string
, symbol
| string
>
Defined in decorators/layout/layout.decorator.ts:63
<Const>
_expressionCache● _expressionCache: object
Defined in decorators/layout/layout.decorator.ts:78
▸ LayoutComponent(aDirective?: LayoutComponentDirective): function
Defined in decorators/layout/layout.decorator.ts:535
Parameters:
Name | Type |
---|---|
Optional aDirective | LayoutComponentDirective |
Returns: function
▸ LayoutMapping(aID: string
| string
[] | LayoutMappingDirective, aSelector?: string
| string
[] | Type
<any
>, aLayoutMode?: string
| string
[]): function
Defined in decorators/layout/layout.decorator.ts:594
Parameters:
Name | Type |
---|---|
aID | string | string [] | LayoutMappingDirective |
Optional aSelector | string | string [] | Type <any > |
Optional aLayoutMode | string | string [] |
Returns: function
▸ RenderingContextBinding<T
>(aBinding?: string
| RenderingContextDirective<T
>, aDefault?: T
): function
Defined in decorators/layout/layout.decorator.ts:565
Type parameters:
Parameters:
Name | Type |
---|---|
Optional aBinding | string | RenderingContextDirective<T > |
Optional aDefault | T |
Returns: function
▸ _assertBinding<T
>(aInstance: any
, aSymbol: symbol
| string
, aName: string
): Binding<T
>
Defined in decorators/layout/layout.decorator.ts:156
Makes sure we have a binding
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aInstance | any | the instance to attach the binding to |
aSymbol | symbol | string | the symbol |
aName | string | name of the object |
Returns: Binding<T
>
the binding
▸ _baseExpressionFromObservableExpression(aKey: string
): string
Defined in decorators/layout/layout.decorator.ts:337
Parameters:
Name | Type |
---|---|
aKey | string |
Returns: string
▸ _getExpressionFromDescriptor(aPrototype: any
, aOtherKey: string
): string
| null
| undefined
Defined in decorators/layout/layout.decorator.ts:365
Returns an expression from its descriptor
Parameters:
Name | Type | Description |
---|---|---|
aPrototype | any | the prototype |
aOtherKey | string | the key |
Returns: string
| null
| undefined
the expression, null if no expression exists and undefined if we need to fallback
▸ _getExpressionFromPrototype(aPrototype: any
, aOtherKey: string
): string
| null
| undefined
Defined in decorators/layout/layout.decorator.ts:394
Checks if we can find an expression from the other property
Parameters:
Name | Type | Description |
---|---|---|
aPrototype | any | the prototype |
aOtherKey | string | the other key |
Returns: string
| null
| undefined
the expression, null if no expression exists and undefined if we need to fallback
▸ _getExpressionGetter(aPrototype: any
, aExpression: string
| null
| undefined
, aKey: string
, aOtherKey: string
): ExpressionGetter
Defined in decorators/layout/layout.decorator.ts:422
Returns a getter method that computes the expression associated with a property
Parameters:
Name | Type | Description |
---|---|---|
aPrototype | any | current prototype |
aExpression | string | null | undefined | the expression, may be null or undefined |
aKey | string | |
aOtherKey | string | the alternative key |
Returns: ExpressionGetter the getter. The getter returns the expression or null
▸ _getObservableExpression<T
>(aInstance: any
, aSymbol: symbol
| string
, aName: string
, aHandler: RenderingContextDirective<T
>): Observable
<T
>
Defined in decorators/layout/layout.decorator.ts:198
Type parameters:
Parameters:
Name | Type |
---|---|
aInstance | any |
aSymbol | symbol | string |
aName | string |
aHandler | RenderingContextDirective<T > |
Returns: Observable
<T
>
▸ _getOnRenderingContext(aInstance: any
): Observable
<RenderingContext
>
Defined in decorators/layout/layout.decorator.ts:169
Parameters:
Name | Type |
---|---|
aInstance | any |
Returns: Observable
<RenderingContext
>
▸ _getResolvedExpression<T
>(aInstance: any
, aSymbol: symbol
| string
, aBaseName: string
, aObserableName: string
, aHandler?: RenderingContextDirective<T
>): T
Defined in decorators/layout/layout.decorator.ts:267
Type parameters:
Parameters:
Name | Type |
---|---|
aInstance | any |
aSymbol | symbol | string |
aBaseName | string |
aObserableName | string |
Optional aHandler | RenderingContextDirective<T > |
Returns: T
▸ _getSymbol(aName: string
): symbol
| string
Defined in decorators/layout/layout.decorator.ts:71
Parameters:
Name | Type |
---|---|
aName | string |
Returns: symbol
| string
▸ _isObservableExpression(aKey: string
): boolean
Defined in decorators/layout/layout.decorator.ts:321
Parameters:
Name | Type |
---|---|
aKey | string |
Returns: boolean
▸ _isStringOrArray(aValue: any
): boolean
Defined in decorators/layout/layout.decorator.ts:585
Tests if a value is a string or a string array
Parameters:
Name | Type |
---|---|
aValue | any |
Returns: boolean
▸ _isUpperCase(aValue: string
): boolean
Defined in decorators/layout/layout.decorator.ts:311
Parameters:
Name | Type |
---|---|
aValue | string |
Returns: boolean
▸ _observableExpressionFromBaseExpression(aKey: string
): string
Defined in decorators/layout/layout.decorator.ts:350
Parameters:
Name | Type |
---|---|
aKey | string |
Returns: string
▸ _parseExpression(aExpression: string
): RenderingContextDirective<any
>
Defined in decorators/layout/layout.decorator.ts:86
Parameters:
Name | Type |
---|---|
aExpression | string |
Returns: RenderingContextDirective<any
>
▸ _registerExpression<T
>(aPrototype: any
, aPropertyKey: string
, aExpression: string
, aDefault?: T
): void
Defined in decorators/layout/layout.decorator.ts:131
Type parameters:
Parameters:
Name | Type |
---|---|
aPrototype | any |
aPropertyKey | string |
aExpression | string |
Optional aDefault | T |
Returns: void
▸ _registerRenderingContextDirective<T
>(aPrototype: any
, aPropertyKey: string
, aExpression: string
| null
, aHandler?: RenderingContextDirective<T
>, aDefault?: T
): void
Defined in decorators/layout/layout.decorator.ts:459
Type parameters:
Parameters:
Name | Type |
---|---|
aPrototype | any |
aPropertyKey | string |
aExpression | string | null |
Optional aHandler | RenderingContextDirective<T > |
Optional aDefault | T |
Returns: void
▸ _registerSubscription(aInstance: any
, aSubscription: Subscription
): void
Defined in decorators/layout/layout.decorator.ts:230
Parameters:
Name | Type |
---|---|
aInstance | any |
aSubscription | Subscription |
Returns: void
@ibm-wch-sdk/ng > "decorators/layout/layout.directive"
Ƭ RenderingContextDirective: function
Defined in decorators/layout/layout.directive.ts:37
▸(ctx: RenderingContext
): T
Parameters:
Name | Type |
---|---|
ctx | RenderingContext |
Returns: T
@ibm-wch-sdk/ng > "directives/contentref.directive"
<Const>
KEYS● KEYS: string
[] = [KEY_LAYOUT_MODE, KEY_RENDERING_CONTEXT]
Defined in directives/contentref.directive.ts:41
<Const>
LOGGER● LOGGER: "ContentRefDirective" = "ContentRefDirective"
Defined in directives/contentref.directive.ts:43
▸ _getComponentFactoryResolver(aConfig?: Route
): ComponentFactoryResolver
Defined in directives/contentref.directive.ts:21
Parameters:
Name | Type |
---|---|
Optional aConfig | Route |
Returns: ComponentFactoryResolver
@ibm-wch-sdk/ng > "guards/root.page.guard"
@ibm-wch-sdk/ng > "interfaces"
@ibm-wch-sdk/ng > "interfaces/hub-context"
@ibm-wch-sdk/ng > "internal/assert"
<Let>
DEV_MODE_ENABLED● DEV_MODE_ENABLED: boolean
= true
Defined in internal/assert.ts:21
<Const>
DEV_MODE_SUBJECT● DEV_MODE_SUBJECT: BehaviorSubject
<boolean
> = new _BehaviorSubject(DEV_MODE_ENABLED)
Defined in internal/assert.ts:26
<Const>
_BehaviorSubject● _BehaviorSubject: BehaviorSubject
= BehaviorSubject
Defined in internal/assert.ts:16
▸ assertDefined(aValue: any
, aMessage?: string
): void
Defined in internal/assert.ts:91
Parameters:
Name | Type |
---|---|
aValue | any |
Optional aMessage | string |
Returns: void
▸ assertDependency(aValue: any
, aName: string
): void
Defined in internal/assert.ts:41
Parameters:
Name | Type |
---|---|
aValue | any |
aName | string |
Returns: void
▸ assertIsAbsoluteURL(aValue: URL
| string
, aMessage?: string
): void
Defined in internal/assert.ts:115
Parameters:
Name | Type |
---|---|
aValue | URL | string |
Optional aMessage | string |
Returns: void
▸ assertIsArray(aValue: any
, aMessage?: string
): void
Defined in internal/assert.ts:71
Parameters:
Name | Type |
---|---|
aValue | any |
Optional aMessage | string |
Returns: void
▸ assertIsFunction(aValue: any
, aMessage?: string
): void
Defined in internal/assert.ts:59
Parameters:
Name | Type |
---|---|
aValue | any |
Optional aMessage | string |
Returns: void
▸ assertIsObservable(aValue: any
, aMessage?: string
): void
Defined in internal/assert.ts:47
Parameters:
Name | Type |
---|---|
aValue | any |
Optional aMessage | string |
Returns: void
▸ assertIsPlainObject(aValue: any
, aMessage?: string
): void
Defined in internal/assert.ts:53
Parameters:
Name | Type |
---|---|
aValue | any |
Optional aMessage | string |
Returns: void
▸ assertIsString(aValue: any
, aMessage?: string
): void
Defined in internal/assert.ts:65
Parameters:
Name | Type |
---|---|
aValue | any |
Optional aMessage | string |
Returns: void
▸ assertNil(aValue: any
, aMessage?: string
): void
Defined in internal/assert.ts:77
Parameters:
Name | Type |
---|---|
aValue | any |
Optional aMessage | string |
Returns: void
▸ assertNotNil(aValue: any
, aMessage?: string
): void
Defined in internal/assert.ts:83
Parameters:
Name | Type |
---|---|
aValue | any |
Optional aMessage | string |
Returns: void
▸ assertNull(aValue: any
, aMessage?: string
): void
Defined in internal/assert.ts:103
Parameters:
Name | Type |
---|---|
aValue | any |
Optional aMessage | string |
Returns: void
▸ assertTrue(aValue: any
, aMessage?: string
): void
Defined in internal/assert.ts:109
Parameters:
Name | Type |
---|---|
aValue | any |
Optional aMessage | string |
Returns: void
▸ assertUndefined(aValue: any
, aMessage?: string
): void
Defined in internal/assert.ts:97
Parameters:
Name | Type |
---|---|
aValue | any |
Optional aMessage | string |
Returns: void
▸ isAssertOn(): boolean
Defined in internal/assert.ts:37
Returns: boolean
▸ isDevModeOn(): boolean
Defined in internal/assert.ts:33
Returns: boolean
<Const>
LOGGER● LOGGER: "WchNgModule" = "WchNgModule"
Defined in module.ts:44
@ibm-wch-sdk/ng > "modules/components.module"
<Const>
LOGGER● LOGGER: "WchNgComponentsModule" = "WchNgComponentsModule"
Defined in modules/components.module.ts:15
@ibm-wch-sdk/ng > "modules/services.module"
<Const>
LOGGER● LOGGER: "WchNgServicesModule" = "WchNgServicesModule"
Defined in modules/services.module.ts:11
@ibm-wch-sdk/ng > "routing/default.routes"
<Const>
DEFAULT_ROUTES● DEFAULT_ROUTES: Routes
= freezeDeep([
{
path: '**',
component: PageComponent
}
])
Defined in routing/default.routes.ts:6
@ibm-wch-sdk/ng > "services/bootstrap/bootstrap.service"
<Const>
LOGGER● LOGGER: "BootstrapService" = "BootstrapService"
Defined in services/bootstrap/bootstrap.service.ts:15
@ibm-wch-sdk/ng > "services/components/components.service"
<Const>
LOGGER● LOGGER: "ComponentsService" = "ComponentsService"
Defined in services/components/components.service.ts:26
<Const>
_DEFAULT_LAYOUT● _DEFAULT_LAYOUT: "wch-default-layout" = "wch-default-layout"
Defined in services/components/components.service.ts:29
<Const>
_DEFAULT_LAYOUT_MODES● _DEFAULT_LAYOUT_MODES: string
[] = [DEFAULT_LAYOUT_MODE]
Defined in services/components/components.service.ts:96
<Const>
_PAGE_NOT_FOUND_LAYOUT● _PAGE_NOT_FOUND_LAYOUT: "wch-404" = "wch-404"
Defined in services/components/components.service.ts:31
▸ _createMappingEntry(aKey: string
, aLayoutMode: string
): MappingEntry
Defined in services/components/components.service.ts:63
Constructs an entry in the mapping table
Parameters:
Name | Type | Description |
---|---|---|
aKey | string | the layout key |
aLayoutMode | string | the layout mode for debugging purposes |
Returns: MappingEntry the entry
▸ _getEntry(aController: string
, aLayoutMode: string
, aMapByLayoutMode: ByLayoutModeMapping): MappingEntry
Defined in services/components/components.service.ts:182
Makes sure to get a subject
Parameters:
Name | Type | Description |
---|---|---|
aController | string | the controller ID |
aLayoutMode | string | the layout mode |
aMapByLayoutMode | ByLayoutModeMapping | the mapping from layout mode to controller mapping |
Returns: MappingEntry the subject
▸ _getLayoutModesFromComponent(aComponent: RegisteredComponent): string
[]
Defined in services/components/components.service.ts:119
Returns the layout modes for the component
Parameters:
Name | Type | Description |
---|---|---|
aComponent | RegisteredComponent | the layout component descriptor |
Returns: string
[]
the modes
▸ _getLayoutModesFromConfig(aModes?: string
| string
[]): string
[]
Defined in services/components/components.service.ts:104
Returns the layout modes for the component
Parameters:
Name | Type | Description |
---|---|---|
Optional aModes | string | string [] | the layout component descriptor |
Returns: string
[]
the modes
▸ _getSelectorsFromComponent(aComponent: RegisteredComponent): string
[]
Defined in services/components/components.service.ts:82
Parameters:
Name | Type |
---|---|
aComponent | RegisteredComponent |
Returns: string
[]
▸ _getTypeByLayout(aLayout: Layout
, aLayoutMode: string
, aMapping: ByLayoutModeMapping, aMarkupService: MarkupService): Observable
<ComponentTypeRef
<any
>>
Defined in services/components/components.service.ts:258
Parameters:
Name | Type |
---|---|
aLayout | Layout |
aLayoutMode | string |
aMapping | ByLayoutModeMapping |
aMarkupService | MarkupService |
Returns: Observable
<ComponentTypeRef
<any
>>
▸ _getTypeBySelector(aSelector: string
, aLayoutMode: string
, aMapping: ByLayoutModeMapping): Observable
<ComponentTypeRef
<any
>>
Defined in services/components/components.service.ts:233
Parameters:
Name | Type |
---|---|
aSelector | string |
aLayoutMode | string |
aMapping | ByLayoutModeMapping |
Returns: Observable
<ComponentTypeRef
<any
>>
▸ _getTypeByTemplateType(aType: string
, aLayoutMode: string
, aMarkupService: MarkupService): Observable
<ComponentTypeRef
<any
>>
Defined in services/components/components.service.ts:217
Parameters:
Name | Type |
---|---|
aType | string |
aLayoutMode | string |
aMarkupService | MarkupService |
Returns: Observable
<ComponentTypeRef
<any
>>
▸ _getTypeName(aType: Type
<any
>): string
Defined in services/components/components.service.ts:52
Tries to decode the name from the type
Parameters:
Name | Type | Description |
---|---|---|
aType | Type <any > | the type |
Returns: string
the name
▸ _onRegisterComponent(aController: string
, aLayoutMode: string
, aTypeRef: ComponentTypeRef
<any
>, aMap: ByLayoutModeMapping): void
Defined in services/components/components.service.ts:202
Parameters:
Name | Type |
---|---|
aController | string |
aLayoutMode | string |
aTypeRef | ComponentTypeRef <any > |
aMap | ByLayoutModeMapping |
Returns: void
▸ _onRegisteredComponent(aComponent: RegisteredComponent, aMap: ByLayoutModeMapping): void
Defined in services/components/components.service.ts:149
Parameters:
Name | Type |
---|---|
aComponent | RegisteredComponent |
aMap | ByLayoutModeMapping |
Returns: void
▸ _registerByLayoutModesAndSelectors(aTypeRef: ComponentTypeRef
<any
>, aLayoutModes: string
[], aSelectors: string
[], aMap: ByLayoutModeMapping): void
Defined in services/components/components.service.ts:125
Parameters:
Name | Type |
---|---|
aTypeRef | ComponentTypeRef <any > |
aLayoutModes | string [] |
aSelectors | string [] |
aMap | ByLayoutModeMapping |
Returns: void
@ibm-wch-sdk/ng > "services/config/application.config"
@ibm-wch-sdk/ng > "services/config/application.config.service"
@ibm-wch-sdk/ng > "services/config/empty.application.config"
<Const>
EMPTY_APPLICATION_CONFIGEMPTY_APPLICATION_CONFIG: object
Defined in services/config/empty.application.config.ts:4
● classification: string
= "content"
Defined in services/config/empty.application.config.ts:7
● elements: object
Defined in services/config/empty.application.config.ts:11
● id: null
= null
Defined in services/config/empty.application.config.ts:5
● kind: undefined
[] = []
Defined in services/config/empty.application.config.ts:8
● name: null
= null
Defined in services/config/empty.application.config.ts:6
● type: null
= null
Defined in services/config/empty.application.config.ts:9
● typeId: null
= null
Defined in services/config/empty.application.config.ts:10
@ibm-wch-sdk/ng > "services/dependency/dependency.service"
<Const>
LOGGER● LOGGER: "DependencyService" = "DependencyService"
Defined in services/dependency/dependency.service.ts:15
@ibm-wch-sdk/ng > "services/dependency/message"
<Const>
LOGGER● LOGGER: "SdkMessages" = "SdkMessages"
Defined in services/dependency/message.ts:6
<Const>
SDK_MESSAGE_HANDLER● SDK_MESSAGE_HANDLER: InjectionToken
<SdkMessageHandler
> = new InjectionToken('SdkMessageHandler')
Defined in services/dependency/message.ts:9
@ibm-wch-sdk/ng > "services/dependency/message/sdk.navigate.by.path.message"
<Const>
LOGGER● LOGGER: "SdkNavigateByPathHandler" = "SdkNavigateByPathHandler"
Defined in services/dependency/message/sdk.navigate.by.path.message.ts:9
@ibm-wch-sdk/ng > "services/dependency/message/sdk.refresh.message"
<Const>
LOGGER● LOGGER: "SdkRefreshHandler" = "SdkRefreshHandler"
Defined in services/dependency/message/sdk.refresh.message.ts:9
@ibm-wch-sdk/ng > "services/dependency/message/sdk.set.mode.message"
<Const>
LOGGER● LOGGER: "SdkSetModeHandler" = "SdkSetModeHandler"
Defined in services/dependency/message/sdk.set.mode.message.ts:9
@ibm-wch-sdk/ng > "services/dependency/message/sdk.subscribe.active.route.message"
<Const>
LOGGER● LOGGER: "SdkSubscribeActiveRouteHandler" = "SdkSubscribeActiveRouteHandler"
Defined in services/dependency/message/sdk.subscribe.active.route.message.ts:9
@ibm-wch-sdk/ng > "services/dependency/message/sdk.subscribe.message"
<Const>
LOGGER● LOGGER: "SdkUnsubscribeHandler" = "SdkUnsubscribeHandler"
Defined in services/dependency/message/sdk.subscribe.message.ts:8
@ibm-wch-sdk/ng > "services/dependency/message/sdk.subscribe.mode.message"
<Const>
LOGGER● LOGGER: "SdkSubscribeModeHandler" = "SdkSubscribeModeHandler"
Defined in services/dependency/message/sdk.subscribe.mode.message.ts:9
@ibm-wch-sdk/ng > "services/dependency/message/sdk.subscribe.route.message"
<Const>
LOGGER● LOGGER: "SdkSubscribeRouteHandler" = "SdkSubscribeRouteHandler"
Defined in services/dependency/message/sdk.subscribe.route.message.ts:9
@ibm-wch-sdk/ng > "services/dependency/sdk/jsonp/jsonp"
Ƭ JsonpCallback: Consumer
<AnyJson
>
Defined in services/dependency/sdk/jsonp/jsonp.ts:22
<Const>
LOGGER● LOGGER: "SdkJsonp" = "SdkJsonp"
Defined in services/dependency/sdk/jsonp/jsonp.ts:15
<Const>
_digestCache● _digestCache: function
= createCache()
Defined in services/dependency/sdk/jsonp/jsonp.ts:31
▸(aKey: string
, aCallback: CacheCallback
<V
>, aLogger?: Logger
): V
Parameters:
Name | Type |
---|---|
aKey | string |
aCallback | CacheCallback <V > |
Optional aLogger | Logger |
Returns: V
<Const>
_createDigest▸ _createDigest(aToken: string
): string
Defined in services/dependency/sdk/jsonp/jsonp.ts:39
Parameters:
Name | Type |
---|---|
aToken | string |
Returns: string
<Const>
_getHash▸ _getHash(aToken: string
): string
Defined in services/dependency/sdk/jsonp/jsonp.ts:47
Parameters:
Name | Type |
---|---|
aToken | string |
Returns: string
▸ _registerCallback(aApiRoot: string
, aUrl: string
, aCallback: JsonpCallback, aCallbacks: JsonpCallbacks): string
Defined in services/dependency/sdk/jsonp/jsonp.ts:57
Parameters:
Name | Type |
---|---|
aApiRoot | string |
aUrl | string |
aCallback | JsonpCallback |
aCallbacks | JsonpCallbacks |
Returns: string
<Const>
_removeCallback▸ _removeCallback(aDigest: string
, aCallbacks: JsonpCallbacks): boolean
Defined in services/dependency/sdk/jsonp/jsonp.ts:79
Parameters:
Name | Type |
---|---|
aDigest | string |
aCallbacks | JsonpCallbacks |
Returns: boolean
@ibm-wch-sdk/ng > "services/dependency/sdk/router/router"
<Const>
LOGGER● LOGGER: "SdkRouter" = "SdkRouter"
Defined in services/dependency/sdk/router/router.ts:11
@ibm-wch-sdk/ng > "services/dependency/sdk/sdk"
<Const>
LOGGER● LOGGER: "Sdk" = "Sdk"
Defined in services/dependency/sdk/sdk.ts:26
<Const>
_MESSAGE_EVENT● _MESSAGE_EVENT: "message" = "message"
Defined in services/dependency/sdk/sdk.ts:13
<Const>
_MODULE_NAME● _MODULE_NAME: "WchSdk" = WCH_SDK_MODULE_NAME
Defined in services/dependency/sdk/sdk.ts:28
<Const>
bHasHandlers● bHasHandlers: boolean
= (typeof addEventListener === FUNCTION_TYPE) && (typeof removeEventListener === FUNCTION_TYPE)
Defined in services/dependency/sdk/sdk.ts:15
@ibm-wch-sdk/ng > "services/dependency/sdk/search/search"
@ibm-wch-sdk/ng > "services/dependency/sdk/version"
<Const>
SDK_VERSIONSDK_VERSION: object
Defined in services/dependency/sdk/version.ts:15
● build: Date
= new Date(VERSION.build)
Defined in services/dependency/sdk/version.ts:17
● version: Version
= new Version(VERSION.version)
Defined in services/dependency/sdk/version.ts:16
@ibm-wch-sdk/ng > "services/http/http.service"
@ibm-wch-sdk/ng > "services/http/http.service.on.http.client"
@ibm-wch-sdk/ng > "services/http/http.service.on.jsonp"
<Const>
LOGGER● LOGGER: "HttpServiceOnJsonp" = "HttpServiceOnJsonp"
Defined in services/http/http.service.on.jsonp.ts:17
@ibm-wch-sdk/ng > "services/hub-info/hub-info.service"
▸ selectApiURL(aService?: HubInfoConfig
): HubInfoUrlProvider
Defined in services/hub-info/hub-info.service.ts:105
Parameters:
Name | Type |
---|---|
Optional aService | HubInfoConfig |
Returns: HubInfoUrlProvider
▸ selectBaseURL(aService?: HubInfoConfig
): HubInfoUrlProvider
Defined in services/hub-info/hub-info.service.ts:115
Parameters:
Name | Type |
---|---|
Optional aService | HubInfoConfig |
Returns: HubInfoUrlProvider
▸ selectCycleHandlingStrategy(aService?: HubInfoConfig
): CYCLE_HANDLING
| string
Defined in services/hub-info/hub-info.service.ts:131
Parameters:
Name | Type |
---|---|
Optional aService | HubInfoConfig |
Returns: CYCLE_HANDLING
| string
▸ selectDeliveryURL(aService?: HubInfoConfig
): HubInfoUrlProvider
Defined in services/hub-info/hub-info.service.ts:109
Parameters:
Name | Type |
---|---|
Optional aService | HubInfoConfig |
Returns: HubInfoUrlProvider
▸ selectFetchLevels(aService?: HubInfoConfig
): number
Defined in services/hub-info/hub-info.service.ts:137
Parameters:
Name | Type |
---|---|
Optional aService | HubInfoConfig |
Returns: number
▸ selectHttpOptions(aService?: HubInfoConfig
): HttpResourceOptions
Defined in services/hub-info/hub-info.service.ts:119
Parameters:
Name | Type |
---|---|
Optional aService | HubInfoConfig |
Returns: HttpResourceOptions
▸ selectHttpPreviewOptions(aService?: HubInfoConfig
): HttpResourceOptions
Defined in services/hub-info/hub-info.service.ts:125
Parameters:
Name | Type |
---|---|
Optional aService | HubInfoConfig |
Returns: HttpResourceOptions
@ibm-wch-sdk/ng > "services/hub-info/tokens"
<Const>
WCH_HUB_INFO_CONFIG● WCH_HUB_INFO_CONFIG: InjectionToken
<HubInfoConfig
> = new InjectionToken(
'HubInfoConfig'
)
Defined in services/hub-info/tokens.ts:83
<Const>
WCH_TOKEN_API_URL● WCH_TOKEN_API_URL: "D86BA418-5252-45BB-938C-E17BBE044D0F" = "D86BA418-5252-45BB-938C-E17BBE044D0F"
Defined in services/hub-info/tokens.ts:15
URL to access the API layer
Naming of this field according to the field in the rendering context
example: 'https://my.digitalexperience.ibm.com/api/345563cf-a83c-40e5-a065-1d6ff36b05c1'
example: 'https://my.digitalexperience.ibm.com/api/345563cf-a83c-40e5-a065-1d6ff36b05c1/dxsites/mysite'
see: [[HubInfoConfig]]
<Const>
WCH_TOKEN_BASE_URL● WCH_TOKEN_BASE_URL: "F5EBA2A4-2C6F-4FEF-B3D5-3C801CB1F2EB" = "F5EBA2A4-2C6F-4FEF-B3D5-3C801CB1F2EB"
Defined in services/hub-info/tokens.ts:40
URL that represents the base URL of the path based routing of the application. This prefix will be preserved when generating and recognizing URLs. If this property is not configured, then it will be decoded from the window location.
example: 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1'
example: 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1/dxsites/mysite'
example: 'https://my.external.example.com/'
see: [[HubInfoConfig]]
<Const>
WCH_TOKEN_CYCLE_HANDLING_STRATEGY● WCH_TOKEN_CYCLE_HANDLING_STRATEGY: "FAB70C09-F04A-4702-A8CC-87D3A3CED224" = "FAB70C09-F04A-4702-A8CC-87D3A3CED224"
Defined in services/hub-info/tokens.ts:72
Optionally specify how the SDK is supposed to deal with cyclic references in the content data structure. Per default the rendering context will break cycles by representing the duplicate element in a reference path by an unresolved reference. When configuring the strategy to {@link CYCLE_HANDLING.RESOLVE}, the ContentrefComponent will use a resolved refence when rendering the context, instead of the unresolved reference. This bears the risk of an infinite loop during rendering. The actual rendering context objects will still not have cycles, so a JSON serialization of these objects will produce a valid result.
Default is {@link CYCLE_HANDLING.BREAK}
see: [[HubInfoConfig]]
<Const>
WCH_TOKEN_DELIVERY_URL● WCH_TOKEN_DELIVERY_URL: "4BEFD6AD-FA4C-42D7-8C4C-2DCA38CDB499" = "4BEFD6AD-FA4C-42D7-8C4C-2DCA38CDB499"
Defined in services/hub-info/tokens.ts:27
URL to access the delivery
Naming of this field according to the field in the rendering context
example: 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1'
example: 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1/dxsites/mysite'
see: [[HubInfoConfig]]
<Const>
WCH_TOKEN_FETCH_LEVELS● WCH_TOKEN_FETCH_LEVELS: "62906A7D-0DE3-4404-AE7C-89E5FD91C72D" = "62906A7D-0DE3-4404-AE7C-89E5FD91C72D"
Defined in services/hub-info/tokens.ts:81
Number of levels to fetch per request to the rendering context. If missing all levels will be fetched.
see: [[HubInfoConfig]]
<Const>
WCH_TOKEN_HTTP_OPTIONS● WCH_TOKEN_HTTP_OPTIONS: "536C2178-F41A-4F56-AF89-83B52E5274D9" = "536C2178-F41A-4F56-AF89-83B52E5274D9"
Defined in services/hub-info/tokens.ts:47
Optionally specify how the SDK makes outbound requests
see: [[HubInfoConfig]]
<Const>
WCH_TOKEN_HTTP_PREVIEW_OPTIONS● WCH_TOKEN_HTTP_PREVIEW_OPTIONS: "3AC667BA-FBAE-426D-BE7C-00DF1364280D" = "3AC667BA-FBAE-426D-BE7C-00DF1364280D"
Defined in services/hub-info/tokens.ts:54
Optionally specify how the SDK makes outbound requests for the preview case
see: [[HubInfoConfig]]
@ibm-wch-sdk/ng > "services/info/wch.info.service"
@ibm-wch-sdk/ng > "services/logger/logger.service"
<Const>
CREATE_CONSOLE_LOGGER● CREATE_CONSOLE_LOGGER: UnaryFunction
<string
, Logger
> = createConsoleLogger
Defined in services/logger/logger.service.ts:21
<Const>
CREATE_EMPTY_LOGGER● CREATE_EMPTY_LOGGER: UnaryFunction
<string
, Logger
> = createEmptyLogger
Defined in services/logger/logger.service.ts:23
<Const>
_LOGGERS● _LOGGERS: object
Defined in services/logger/logger.service.ts:18
<Let>
_hasLoggerDelegateOverride● _hasLoggerDelegateOverride: boolean
= false
Defined in services/logger/logger.service.ts:29
<Let>
_loggerDelegateOverride● _loggerDelegateOverride: any
Defined in services/logger/logger.service.ts:26
<Const>
_modeSubscription● _modeSubscription: Subscription
= DEV_MODE_SUBJECT.subscribe(mode => {
// we only need to refresh if there was not explicit override
if (_hasLoggerDelegateOverride) {
_refreshLoggers();
}
})
Defined in services/logger/logger.service.ts:110
▸ _getLogger(aName: any
): any
Defined in services/logger/logger.service.ts:38
Parameters:
Name | Type |
---|---|
aName | any |
Returns: any
▸ _getLoggerDelegate(): any
Defined in services/logger/logger.service.ts:31
Returns: any
▸ _isLogging(): boolean
Defined in services/logger/logger.service.ts:47
Tests if logging is enabled
Returns: boolean
true if logging is enabled, else false
▸ _logDeferred(aFunction: Function
, aArgs: IArguments
): void
Defined in services/logger/logger.service.ts:76
Parameters:
Name | Type |
---|---|
aFunction | Function |
aArgs | IArguments |
Returns: void
▸ _logError(aType: string
, ...aArgs: any
[]): void
Defined in services/logger/logger.service.ts:61
Parameters:
Name | Type |
---|---|
aType | string |
Rest aArgs | any [] |
Returns: void
▸ _logErrorDeferred(aType: string
, ...aArgs: any
[]): void
Defined in services/logger/logger.service.ts:89
Parameters:
Name | Type |
---|---|
aType | string |
Rest aArgs | any [] |
Returns: void
▸ _logInfo(aType: string
, ...aArgs: any
[]): void
Defined in services/logger/logger.service.ts:52
Parameters:
Name | Type |
---|---|
aType | string |
Rest aArgs | any [] |
Returns: void
▸ _logInfoDeferred(aType: string
, ...aArgs: any
[]): void
Defined in services/logger/logger.service.ts:84
Parameters:
Name | Type |
---|---|
aType | string |
Rest aArgs | any [] |
Returns: void
▸ _logWarn(aType: string
, ...aArgs: any
[]): void
Defined in services/logger/logger.service.ts:67
Parameters:
Name | Type |
---|---|
aType | string |
Rest aArgs | any [] |
Returns: void
▸ _logWarnDeferred(aType: string
, ...aArgs: any
[]): void
Defined in services/logger/logger.service.ts:94
Parameters:
Name | Type |
---|---|
aType | string |
Rest aArgs | any [] |
Returns: void
▸ _refreshLoggers(): void
Defined in services/logger/logger.service.ts:99
Returns: void
@ibm-wch-sdk/ng > "services/logger/wch.logger.service"
▸ _createLoggerProxy(aName: string
): Logger
Defined in services/logger/wch.logger.service.ts:13
Constructs a proxy around our logger
Parameters:
Name | Type | Description |
---|---|---|
aName | string | the name of the loger |
Returns: Logger
the proxy
@ibm-wch-sdk/ng > "services/mappings/mappings.service"
Ƭ MappingEntry: Record
<string
, Selector>
Defined in services/mappings/mappings.service.ts:31
Ƭ Selector: string
| Type
<any
>
Defined in services/mappings/mappings.service.ts:26
<Const>
EMPTY_ARRAY● EMPTY_ARRAY: string
[] = []
Defined in services/mappings/mappings.service.ts:70
<Const>
EMPTY_LAYOUT_MODES● EMPTY_LAYOUT_MODES: string
[] = [DEFAULT_LAYOUT_MODE]
Defined in services/mappings/mappings.service.ts:71
<Const>
LOGGER● LOGGER: "MappingsService" = "MappingsService"
Defined in services/mappings/mappings.service.ts:24
▸ _findMappingByKind(aKeys: string
[], aMap: Mappings): MappingEntry | undefined
Defined in services/mappings/mappings.service.ts:45
Parameters:
Name | Type |
---|---|
aKeys | string [] |
aMap | Mappings |
Returns: MappingEntry | undefined
▸ _getIds(aMapping: RegisteredMapping): string
[]
Defined in services/mappings/mappings.service.ts:95
Parameters:
Name | Type |
---|---|
aMapping | RegisteredMapping |
Returns: string
[]
▸ _getKinds(aMapping: RegisteredMapping): string
[]
Defined in services/mappings/mappings.service.ts:106
Parameters:
Name | Type |
---|---|
aMapping | RegisteredMapping |
Returns: string
[]
▸ _getLayoutModes(aMapping: RegisteredMapping): string
[]
Defined in services/mappings/mappings.service.ts:117
Parameters:
Name | Type |
---|---|
aMapping | RegisteredMapping |
Returns: string
[]
▸ _getMappingById(aKey: string
| null
| undefined
, aMap: Mappings): MappingEntry | undefined
Defined in services/mappings/mappings.service.ts:38
Parameters:
Name | Type |
---|---|
aKey | string | null | undefined |
aMap | Mappings |
Returns: MappingEntry | undefined
▸ _getMappingByKind(aKeys: string
[] | null
| undefined
, aMap: Mappings): MappingEntry | undefined
Defined in services/mappings/mappings.service.ts:63
Parameters:
Name | Type |
---|---|
aKeys | string [] | null | undefined |
aMap | Mappings |
Returns: MappingEntry | undefined
▸ _getSelector(aLayoutMode: string
, aRenderingContext: RenderingContext
, aMap: Mappings): string
| undefined
Defined in services/mappings/mappings.service.ts:223
Parameters:
Name | Type |
---|---|
aLayoutMode | string |
aRenderingContext | RenderingContext |
aMap | Mappings |
Returns: string
| undefined
▸ _getSelectors(aMapping: RegisteredMapping): Selector[]
Defined in services/mappings/mappings.service.ts:128
Parameters:
Name | Type |
---|---|
aMapping | RegisteredMapping |
Returns: Selector[]
▸ _onRegisterMapping(aId: string
, aSelector: Selector, aLayoutMode: string
, aMap: Record
<string
, MappingEntry>): void
Defined in services/mappings/mappings.service.ts:197
Parameters:
Name | Type |
---|---|
aId | string |
aSelector | Selector |
aLayoutMode | string |
aMap | Record <string , MappingEntry> |
Returns: void
▸ _onRegisteredMapping(aMapping: RegisteredMapping, aMap: Mappings): void
Defined in services/mappings/mappings.service.ts:176
Parameters:
Name | Type |
---|---|
aMapping | RegisteredMapping |
aMap | Mappings |
Returns: void
▸ _registerAll(aIds: string
[], aKinds: string
[], aModes: string
[], aSelectors: Selector[], aMap: Mappings): void
Defined in services/mappings/mappings.service.ts:155
Parameters:
Name | Type |
---|---|
aIds | string [] |
aKinds | string [] |
aModes | string [] |
aSelectors | Selector[] |
aMap | Mappings |
Returns: void
▸ _registerAllMappings(aIds: string
[], aModes: string
[], aSelectors: Selector[], aMap: Record
<string
, MappingEntry>): void
Defined in services/mappings/mappings.service.ts:138
Parameters:
Name | Type |
---|---|
aIds | string [] |
aModes | string [] |
aSelectors | Selector[] |
aMap | Record <string , MappingEntry> |
Returns: void
▸ _registerMapping(aId: string
| string
[], aSelector: string
| string
[] | Type
<any
>, aLayoutMode: string
| string
[], aMap: Mappings): void
Defined in services/mappings/mappings.service.ts:256
Parameters:
Name | Type |
---|---|
aId | string | string [] |
aSelector | string | string [] | Type <any > |
aLayoutMode | string | string [] |
aMap | Mappings |
Returns: void
▸ _toStringArray(aValue: any
, aDefault: string
[]): string
[]
Defined in services/mappings/mappings.service.ts:80
Parameters:
Name | Type |
---|---|
aValue | any |
aDefault | string [] |
Returns: string
[]
@ibm-wch-sdk/ng > "services/markup/markup.service"
Ƭ MarkupGenerator: function
Defined in services/markup/markup.service.ts:7
▸(context: RenderingContext
, options?: any
): string
Parameters:
Name | Type |
---|---|
context | RenderingContext |
Optional options | any |
Returns: string
<Const>
KEY_PROVIDERS● KEY_PROVIDERS: string
| symbol
= createSymbol()
Defined in services/markup/markup.service.ts:21
@ibm-wch-sdk/ng > "services/page/active.page.service"
@ibm-wch-sdk/ng > "services/refresh/refresh.service"
<Const>
LOGGER● LOGGER: "RefreshService" = "RefreshService"
Defined in services/refresh/refresh.service.ts:7
@ibm-wch-sdk/ng > "services/resolver/content.resolver.service"
<Const>
LOGGER● LOGGER: "ContentResolverService" = "ContentResolverService"
Defined in services/resolver/content.resolver.service.ts:7
@ibm-wch-sdk/ng > "services/search/search.service"
<Const>
LOGGER● LOGGER: "SearchService" = "SearchService"
Defined in services/search/search.service.ts:12
@ibm-wch-sdk/ng > "services/storage/storage.service"
<Const>
LOGGER● LOGGER: "StorageService" = "StorageService"
Defined in services/storage/storage.service.ts:7
@ibm-wch-sdk/ng > "services/url/urls.service"
<Const>
LOGGER● LOGGER: "UrlsService" = "UrlsService"
Defined in services/url/urls.service.ts:25
@ibm-wch-sdk/ng > "services/wch.service"
<Const>
DEFAULT_CYCLE_HANDLING● DEFAULT_CYCLE_HANDLING: BREAK
= CYCLE_HANDLING.BREAK
Defined in services/wch.service.ts:154
<Const>
EMPTY_PAGE_SEARCH_RESULT● EMPTY_PAGE_SEARCH_RESULT: PageSearchResult
[] = []
Defined in services/wch.service.ts:125
<Const>
EMPTY_RENDERING_CONTEXTS● EMPTY_RENDERING_CONTEXTS: RenderingContext
[] = []
Defined in services/wch.service.ts:126
<Const>
EMPTY_RENDERING_CONTEXTS_SEQUENCE● EMPTY_RENDERING_CONTEXTS_SEQUENCE: Observable
<RenderingContextQueryResult
> = of(EMPTY_RENDERING_QUERY)
Defined in services/wch.service.ts:138
<Const>
EMPTY_RENDERING_CONTEXT_SEARCH_RESULT● EMPTY_RENDERING_CONTEXT_SEARCH_RESULT: RenderingContextSearchResult
[] = []
Defined in services/wch.service.ts:124
<Const>
EMPTY_SITE_PAGES_SEQUENCE● EMPTY_SITE_PAGES_SEQUENCE: Observable
<SitePagesQueryResult
> = of(
EMPTY_SITE_PAGES_QUERY
)
Defined in services/wch.service.ts:141
<Const>
LOGGER● LOGGER: "WchService" = "WchService"
Defined in services/wch.service.ts:150
<Const>
NO_RENDERING_CONTEXT● NO_RENDERING_CONTEXT: Observable
<RenderingContext
> = of(
EMPTY_RENDERING_CONTEXT
).pipe(map(cloneDeep))
Defined in services/wch.service.ts:145
<Const>
UNKNOWN_RENDERING_CONTEXT● UNKNOWN_RENDERING_CONTEXT: Observable
<RenderingContext
> = of(undefined)
Defined in services/wch.service.ts:148
<Const>
_BehaviorSubject● _BehaviorSubject: BehaviorSubject
= BehaviorSubject
Defined in services/wch.service.ts:122
<Const>
_Subject● _Subject: Subject
= Subject
Defined in services/wch.service.ts:151
▸ _pluckDocument<T
>(aSearchResult: SearchResult
<T
>): T
Defined in services/wch.service.ts:162
Extracts the document element from a search result
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSearchResult | SearchResult <T > | the result |
Returns: T
the document
▸ _pluckSiteId(aSite: Site
): string
Defined in services/wch.service.ts:172
Extracts the site ID from the site
Parameters:
Name | Type | Description |
---|---|---|
aSite | Site | the site |
Returns: string
the document
<Const>
EMPTY_RENDERING_QUERYEMPTY_RENDERING_QUERY: object
Defined in services/wch.service.ts:127
● numFound: number
= 0
Defined in services/wch.service.ts:128
● renderingContexts: RenderingContext
[] = EMPTY_RENDERING_CONTEXTS
Defined in services/wch.service.ts:129
<Const>
EMPTY_SITE_PAGES_QUERYEMPTY_SITE_PAGES_QUERY: object
Defined in services/wch.service.ts:131
● numFound: number
= 0
Defined in services/wch.service.ts:132
● sitePages: undefined
[] = []
Defined in services/wch.service.ts:133
@ibm-wch-sdk/ng > "services/zone/zone.service"
▸ opAssertInAngularZone<T
>(): MonoTypeOperatorFunction
<T
>
Defined in services/zone/zone.service.ts:54
Helper operator to assert that a function is executed in an angular zone
Type parameters:
Returns: MonoTypeOperatorFunction
<T
>
the assertion operator
@ibm-wch-sdk/ng > "utils/bootstrap.utils"
Ƭ BootstrapInput: BootstrapSource<T
> | Generator
<BootstrapSource<T
>>
Defined in utils/bootstrap.utils.ts:42
Ƭ BootstrapSource: T
| string
| ObservableInput
<T
>
Defined in utils/bootstrap.utils.ts:41
<Const>
LOGGER● LOGGER: "BootstrapUtils" = "BootstrapUtils"
Defined in utils/bootstrap.utils.ts:37
<Const>
data● data: object
Defined in utils/bootstrap.utils.ts:65
<Const>
_addDebug▸ _addDebug<T
>(aObject: T
): T
Defined in utils/bootstrap.utils.ts:39
Type parameters:
Parameters:
Name | Type |
---|---|
aObject | T |
Returns: T
▸ _bootstrapClear(): void
Defined in utils/bootstrap.utils.ts:139
Returns: void
▸ _bootstrapGet(aKey: string
): Observable
<AnyJson
>
Defined in utils/bootstrap.utils.ts:152
Parameters:
Name | Type |
---|---|
aKey | string |
Returns: Observable
<AnyJson
>
▸ _bootstrapInputToObservable<T
>(aValue: BootstrapInput<T
>): Observable
<T
>
Defined in utils/bootstrap.utils.ts:73
Converts the input to an observable of the desired type
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aValue | BootstrapInput<T > | the value to convert |
Returns: Observable
<T
>
the type
▸ _bootstrapPut(aKey: string
, aValue: AnyJson
| string
| ObservableInput
<AnyJson
> | Generator
<AnyJson
>): void
Defined in utils/bootstrap.utils.ts:167
Parameters:
Name | Type |
---|---|
aKey | string |
aValue | AnyJson | string | ObservableInput <AnyJson > | Generator <AnyJson > |
Returns: void
▸ _bootstrapPutContentWithLayout(aContext: ContentItemWithLayout
| string
): Subscription
| undefined
Defined in utils/bootstrap.utils.ts:200
Parameters:
Name | Type |
---|---|
aContext | ContentItemWithLayout | string |
Returns: Subscription
| undefined
▸ _bootstrapPutSite(aInput: BootstrapInput<Site
>, aSiteId?: string
): Subscription
| undefined
Defined in utils/bootstrap.utils.ts:244
Parameters:
Name | Type |
---|---|
aInput | BootstrapInput<Site > |
Optional aSiteId | string |
Returns: Subscription
| undefined
▸ _bootstrapRemove(aKey: string
): void
Defined in utils/bootstrap.utils.ts:186
Parameters:
Name | Type |
---|---|
aKey | string |
Returns: void
▸ _generatorToObservable<T
>(aGenerator: Generator
<BootstrapSource<T
>>): Observable
<T
>
Defined in utils/bootstrap.utils.ts:106
Converts a generator, the result of the generator can be another input
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aGenerator | Generator <BootstrapSource<T >> | the generator |
Returns: Observable
<T
>
the observable
▸ _internalPut(aKey: string
, aValue: BootstrapInput<AnyJson
>): void
Defined in utils/bootstrap.utils.ts:123
Parameters:
Name | Type |
---|---|
aKey | string |
aValue | BootstrapInput<AnyJson > |
Returns: void
▸ _isBootstrapInput<T
>(aValue: any
): boolean
Defined in utils/bootstrap.utils.ts:52
Tests if the value is a valid input
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aValue | any | the value |
Returns: boolean
true if the value is valid
@ibm-wch-sdk/ng > "utils/component.mapping.utils"
<Const>
LOGGER● LOGGER: "ComponentMappingUtils" = "ComponentMappingUtils"
Defined in utils/component.mapping.utils.ts:13
<Const>
_ReplaySubject● _ReplaySubject: ReplaySubject
= ReplaySubject
Defined in utils/component.mapping.utils.ts:14
<Const>
_mappingsSubject● _mappingsSubject: ReplaySubject
<RegisteredMapping> = new _ReplaySubject()
Defined in utils/component.mapping.utils.ts:41
▸ _destroy(): void
Defined in utils/component.mapping.utils.ts:100
Returns: void
▸ _getRegistered(): Observable
<RegisteredMapping>
Defined in utils/component.mapping.utils.ts:47
Returns: Observable
<RegisteredMapping>
▸ _registerFromLayoutComponent(aDirective: LayoutComponentDirective, aType: Type
<any
>): void
Defined in utils/component.mapping.utils.ts:57
Parameters:
Name | Type |
---|---|
aDirective | LayoutComponentDirective |
aType | Type <any > |
Returns: void
▸ _registerFromMappingDirective(aDirective: LayoutMappingDirective, aComponent: Type
<any
>): void
Defined in utils/component.mapping.utils.ts:85
Parameters:
Name | Type |
---|---|
aDirective | LayoutMappingDirective |
aComponent | Type <any > |
Returns: void
@ibm-wch-sdk/ng > "utils/component.utils"
<Const>
EMPTY_ARRAY● EMPTY_ARRAY: string
[] = []
Defined in utils/component.utils.ts:21
<Const>
KEY_ANNOTATIONS● KEY_ANNOTATIONS: string
| symbol
= createSymbol()
Defined in utils/component.utils.ts:24
<Const>
LOGGER● LOGGER: "ComponentUtils" = "ComponentUtils"
Defined in utils/component.utils.ts:18
<Const>
REFLECT_ANNOTATIONS● REFLECT_ANNOTATIONS: "annotations" = "annotations"
Defined in utils/component.utils.ts:22
<Const>
_ReplaySubject● _ReplaySubject: ReplaySubject
= ReplaySubject
Defined in utils/component.utils.ts:19
<Const>
componentsObservable● componentsObservable: ReplaySubject
<RegisteredComponent> = componentsSubject
Defined in utils/component.utils.ts:82
<Const>
componentsSubject● componentsSubject: ReplaySubject
<RegisteredComponent> = new _ReplaySubject()
Defined in utils/component.utils.ts:81
▸ _addAnnotation(aAnnotation: any
, aHost: any
): any
[]
Defined in utils/component.utils.ts:35
Adds one of our own annotations to the host and returns the set of annotations.
Parameters:
Name | Type | Description |
---|---|---|
aAnnotation | any | the annotation to add |
aHost | any | the host to add the annotations to |
Returns: any
[]
the list of annotations
▸ _destroy(): void
Defined in utils/component.utils.ts:102
Returns: void
▸ _getAllAnnotations(aHost: any
): any
[]
Defined in utils/component.utils.ts:56
Returns all known annotations, which are a combination of our own annotations and the angular annotations.
Parameters:
Name | Type | Description |
---|---|---|
aHost | any | the type to get the annotations from |
Returns: any
[]
the list of annotations
▸ _getAnnotations(aHost: any
): any
[]
Defined in utils/component.utils.ts:45
Returns our annotations for a function type
Parameters:
Name | Type | Description |
---|---|---|
aHost | any | the type to get the annotations from |
Returns: any
[]
the list of annotations
▸ _getRegisteredComponents(): Observable
<RegisteredComponent>
Defined in utils/component.utils.ts:84
Returns: Observable
<RegisteredComponent>
▸ _getSelector(aSelector: string
| Type
<any
> | null
| undefined
): string
| undefined
Defined in utils/component.utils.ts:123
Parameters:
Name | Type |
---|---|
aSelector | string | Type <any > | null | undefined |
Returns: string
| undefined
▸ _getSelectors(aSelector: string
| string
[] | Type
<any
> | null
| undefined
): string
[]
Defined in utils/component.utils.ts:148
Parameters:
Name | Type |
---|---|
aSelector | string | string [] | Type <any > | null | undefined |
Returns: string
[]
▸ _pluckSelector(aMetadata: any
): any
Defined in utils/component.utils.ts:113
Extracts the selector
Parameters:
Name | Type | Description |
---|---|---|
aMetadata | any | metadata |
Returns: any
the selector
▸ _registerComponent(aDirective: LayoutComponentDirective, aType: Type
<any
>): void
Defined in utils/component.utils.ts:88
Parameters:
Name | Type |
---|---|
aDirective | LayoutComponentDirective |
aType | Type <any > |
Returns: void
@ibm-wch-sdk/ng > "utils/http.service"
<Const>
HTTP_SERVICE● HTTP_SERVICE: InjectionToken
<HttpService
> = new InjectionToken(LOGGER)
Defined in utils/http.service.ts:7
<Const>
LOGGER● LOGGER: "HttpService" = "HttpService"
Defined in utils/http.service.ts:5
@ibm-wch-sdk/ng > "utils/http.service.on.http"
<Const>
HTTP_SERVICE_ON_HTTP● HTTP_SERVICE_ON_HTTP: InjectionToken
<HttpService
> = new InjectionToken(LOGGER)
Defined in utils/http.service.on.http.ts:12
<Const>
LOGGER● LOGGER: "HttpServiceOnHttp" = "HttpServiceOnHttp"
Defined in utils/http.service.on.http.ts:10
▸ createHttpServiceOnHttp(aHttp: Http
): HttpService
Defined in utils/http.service.on.http.ts:22
Creates an http service on top of the (deprecated) http client
deprecated: use createHttpServiceOnHttpClient instead
Parameters:
Name | Type | Description |
---|---|---|
aHttp | Http | the http angular service |
Returns: HttpService
the created service
@ibm-wch-sdk/ng > "utils/http.service.on.http.client"
<Const>
HTTP_SERVICE_ON_HTTP_CLIENT● HTTP_SERVICE_ON_HTTP_CLIENT: InjectionToken
<HttpService
> = new InjectionToken(LOGGER)
Defined in utils/http.service.on.http.client.ts:11
<Const>
LOGGER● LOGGER: "HttpServiceOnHttpClient" = "HttpServiceOnHttpClient"
Defined in utils/http.service.on.http.client.ts:9
▸ createHttpServiceOnHttpClient(aHttp: HttpClient
): HttpService
Defined in utils/http.service.on.http.client.ts:19
Implements the {@link HttpService} interface on top of the {@link HttpClient} interface.
Parameters:
Name | Type | Description |
---|---|---|
aHttp | HttpClient | the client |
Returns: HttpService
service implementation
@ibm-wch-sdk/ng > "utils/http.service.on.jsonp"
<Const>
HTTP_SERVICE_ON_JSONP● HTTP_SERVICE_ON_JSONP: InjectionToken
<HttpService
> = new InjectionToken(LOGGER)
Defined in utils/http.service.on.jsonp.ts:14
<Const>
JSONP_CALLBACK● JSONP_CALLBACK: "callback=JSONP_CALLBACK" = "callback=JSONP_CALLBACK"
Defined in utils/http.service.on.jsonp.ts:16
<Const>
LOGGER● LOGGER: "HttpServiceOnJsonp" = "HttpServiceOnJsonp"
Defined in utils/http.service.on.jsonp.ts:12
<Const>
_JSONP_CALLBACK_PREFIX● _JSONP_CALLBACK_PREFIX: string
= ${_MODULE_NAME}.jsonp.callback.
Defined in utils/http.service.on.jsonp.ts:20
<Const>
_MODULE_NAME● _MODULE_NAME: "WchSdk" = Sdk.MODULE_NAME
Defined in utils/http.service.on.jsonp.ts:19
<Const>
_assertInAngularZone● _assertInAngularZone: assertInAngularZone
= NgZone.assertInAngularZone
Defined in utils/http.service.on.jsonp.ts:47
expect to run in an Angular zone
<Const>
_assertNotInAngularZone● _assertNotInAngularZone: assertNotInAngularZone
= NgZone.assertNotInAngularZone
Defined in utils/http.service.on.jsonp.ts:42
expect to NOT run in an Angular zone
▸ _addCallback(aUrl: string
): string
Defined in utils/http.service.on.jsonp.ts:206
Adds the JSONP callback parameter to the URL
Parameters:
Name | Type | Description |
---|---|---|
aUrl | string | the URL |
Returns: string
the callback
▸ _removeNode(aNode: HTMLScriptElement
): void
Defined in utils/http.service.on.jsonp.ts:27
Parameters:
Name | Type |
---|---|
aNode | HTMLScriptElement |
Returns: void
▸ _sendRequest<T
>(aUrl: string
, aDoc: Document
, aScope: any
, aPending: PendingRequests): Observable
<T
>
Defined in utils/http.service.on.jsonp.ts:59
Type parameters:
Parameters:
Name | Type |
---|---|
aUrl | string |
aDoc | Document |
aScope | any |
aPending | PendingRequests |
Returns: Observable
<T
>
▸ createHttpServiceOnJsonp(aDoc: Document
, aScope: any
, aZoneService: ZoneService): HttpService
Defined in utils/http.service.on.jsonp.ts:226
Implements the {@link HttpService} interface via JSONP requests.
Parameters:
Name | Type | Description |
---|---|---|
aDoc | Document | the document |
aScope | any | the SDK scope |
aZoneService | ZoneService |
Returns: HttpService
service implementation
@ibm-wch-sdk/ng > "utils/js.utils"
<Const>
KEY_DEBUG● KEY_DEBUG: "$$DEBUG" = "$$DEBUG"
Defined in utils/js.utils.ts:8
<Const>
_assign● _assign: assign
= Object.assign
Defined in utils/js.utils.ts:10
<Const>
_defineProperties● _defineProperties: defineProperties
= Object.defineProperties
Defined in utils/js.utils.ts:11
<Const>
_false● _false: false
= false
Defined in utils/js.utils.ts:21
<Const>
_getPrototype● _getPrototype: getPrototypeOf
= Object.getPrototypeOf
Defined in utils/js.utils.ts:93
<Const>
_keys● _keys: keys
= Object.keys
Defined in utils/js.utils.ts:26
<Const>
_true● _true: true
= true
Defined in utils/js.utils.ts:16
<Const>
opDistinctComponentTypeRef● opDistinctComponentTypeRef: MonoTypeOperatorFunction
<ComponentTypeRef
<any
>> = distinctUntilChanged(_isEqualComponentTypeRef)
Defined in utils/js.utils.ts:128
▸ _concatArguments(aDst: any
[], aArgs: IArguments
): any
[]
Defined in utils/js.utils.ts:84
Parameters:
Name | Type |
---|---|
aDst | any [] |
aArgs | IArguments |
Returns: any
[]
▸ _getClassName(aThis: any
, aDefault?: string
): string
Defined in utils/js.utils.ts:101
Tries to decode the classname
Parameters:
Name | Type | Description |
---|---|---|
aThis | any | the instance pointer |
Optional aDefault | string | default name |
Returns: string
▸ _isEqualComponentTypeRef(aLeft: ComponentTypeRef
<any
>, aRight: ComponentTypeRef
<any
>): boolean
Defined in utils/js.utils.ts:118
Parameters:
Name | Type |
---|---|
aLeft | ComponentTypeRef <any > |
aRight | ComponentTypeRef <any > |
Returns: boolean
▸ _perfCloneDeep(aValue: any
): any
Defined in utils/js.utils.ts:33
Parameters:
Name | Type |
---|---|
aValue | any |
Returns: any
▸ _perfDeepEquals(aLeft: any
, aRight: any
): boolean
Defined in utils/js.utils.ts:66
Parameters:
Name | Type |
---|---|
aLeft | any |
aRight | any |
Returns: boolean
▸ _perfFreezeDeep(aValue: any
): any
Defined in utils/js.utils.ts:49
Parameters:
Name | Type |
---|---|
aValue | any |
Returns: any
@ibm-wch-sdk/ng > "utils/lazy.injector"
▸ lazyInjector<T
,R
>(aInjector: Injector
, aToken: any
, aDefault?: T
, aTransform?: UnaryFunction
<T
, R
>): Generator
<R
>
Defined in utils/lazy.injector.ts:14
Performs a lazy lookup of a dependency via an injector
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aInjector | Injector | the injector |
aToken | any | the token |
Optional aDefault | T | an optional default of fallback token |
Optional aTransform | UnaryFunction <T , R > |
Returns: Generator
<R
>
lazy injection result
@ibm-wch-sdk/ng > "utils/markup.utils"
<Const>
LOGGER● LOGGER: "MarkupUtils" = "MarkupUtils"
Defined in utils/markup.utils.ts:8
▸ _addMarkup(aRenderingContext: RenderingContext
, aMapping: MarkupMapping, aProviders: MarkupProviders): void
Defined in utils/markup.utils.ts:91
Parameters:
Name | Type |
---|---|
aRenderingContext | RenderingContext |
aMapping | MarkupMapping |
aProviders | MarkupProviders |
Returns: void
▸ _defineAccessor(aRenderingContext: RenderingContext
, aHandlebarsMarkup: Markup, aOptions?: any
): void
Defined in utils/markup.utils.ts:32
Parameters:
Name | Type |
---|---|
aRenderingContext | RenderingContext |
aHandlebarsMarkup | Markup |
Optional aOptions | any |
Returns: void
▸ _defineAccessors(aRenderingContext: RenderingContext
, aHandlebarsMarkup: Markup[], aOptions?: any
): void
Defined in utils/markup.utils.ts:71
Parameters:
Name | Type |
---|---|
aRenderingContext | RenderingContext |
aHandlebarsMarkup | Markup[] |
Optional aOptions | any |
Returns: void
▸ _emptyMarkupMapping(): MarkupMapping
Defined in utils/markup.utils.ts:84
Returns: MarkupMapping
@ibm-wch-sdk/ng > "utils/page.utils"
<Const>
_ReplaySubject● _ReplaySubject: ReplaySubject
= ReplaySubject
Defined in utils/page.utils.ts:6
<Const>
pageSubject● pageSubject: ReplaySubject
<RenderingContext
> = new _ReplaySubject(1)
Defined in utils/page.utils.ts:9
▸ _disposeActivePage(): void
Defined in utils/page.utils.ts:19
Returns: void
▸ _getActivePage(): Observable
<RenderingContext
>
Defined in utils/page.utils.ts:11
Returns: Observable
<RenderingContext
>
▸ _setActivePage(aRenderingContext: RenderingContext
): void
Defined in utils/page.utils.ts:15
Parameters:
Name | Type |
---|---|
aRenderingContext | RenderingContext |
Returns: void
@ibm-wch-sdk/ng > "utils/rx.utils"
▸ _completeLater<T
>(aSubject: Subject
<T
>): function
Defined in utils/rx.utils.ts:15
Constructs a callback function that completes the subject and then unsubscribes all pending subscriptions
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSubject | Subject <T > | the subject |
Returns: function
the callback
▸ _createLater<K
,O
,T
>(aGenerator: function
): function
Defined in utils/rx.utils.ts:108
Produces a value at a later point in time on top of a generator
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aGenerator | function | the generator function |
Returns: function
a function that takes a parameter and generates an observable based on the result
▸ _createZoneSchedulers(aZone: NgZone
, aDelegate?: SchedulerLike
): ZoneSchedulers
Defined in utils/rx.utils.ts:86
Parameters:
Name | Type |
---|---|
aZone | NgZone |
Optional aDelegate | SchedulerLike |
Returns: ZoneSchedulers
▸ _distinctSubject<T
>(aSubject: Subject
<T
>): Observable
<T
>
Defined in utils/rx.utils.ts:96
Type parameters:
Parameters:
Name | Type |
---|---|
aSubject | Subject <T > |
Returns: Observable
<T
>
▸ _unsubscribeLater(aSubscription: Subscription
| null
| undefined
): function
Defined in utils/rx.utils.ts:25
Parameters:
Name | Type |
---|---|
aSubscription | Subscription | null | undefined |
Returns: function
@ibm-wch-sdk/ng > "utils/site.utils"
▸ _getPathFromUrlSegments(aSegments: UrlSegment
[]): string
Defined in utils/site.utils.ts:12
Constructs the URL path based on the segemnets
Parameters:
Name | Type | Description |
---|---|---|
aSegments | UrlSegment [] | the segments |
Returns: string
the path
@ibm-wch-sdk/ng > "utils/symbol"
<Const>
createSymbol● createSymbol: Generator
<symbol
| string
> =
typeof Symbol === UNDEFINED_TYPE ? hashRandomIdentifier : Symbol
Defined in utils/symbol.ts:9
Creates a unique symbol, either as a real symbol or as a random string if symbols are not available.
returns: the unique symbol
@ibm-wch-sdk/ng > "utils/url.utils"
<Const>
decode● decode: decodeURIComponent
= decodeURIComponent
Defined in utils/url.utils.ts:10
▸ _createBaseURL(aUrl: URL
| string
): string
Defined in utils/url.utils.ts:12
Parameters:
Name | Type |
---|---|
aUrl | URL | string |
Returns: string
▸ _ensureTrailingSlash(aUrl: string
): string
Defined in utils/url.utils.ts:6
Parameters:
Name | Type |
---|---|
aUrl | string |
Returns: string
@ibm-wch-sdk/ng > "utils/url.utils.ifaces"
Ƭ QueryInput: string
| string
[] | null
| undefined
| URLSearchParams
| Query
| HttpParams
Defined in utils/url.utils.ifaces.ts:7
@ibm-wch-sdk/ng > "utils/urls"
<Const>
BFF_BASE_URL● BFF_BASE_URL: Observable
<string
> = USE_PUBLIC_URL.pipe(
map<boolean, string>(bFlag => bFlag ? BFF_PUBLIC_URL : BFF_SECURE_URL),
distinctUntilChanged(),
opShareLast
)
Defined in utils/urls.ts:16
observable that exposes the current base URL for the BFF. The URL does NOT start with a slash but ends with a slash
<Const>
BFF_PUBLIC_URL● BFF_PUBLIC_URL: "delivery/v1/rendering/" = "delivery/v1/rendering/"
Defined in utils/urls.ts:8
<Const>
BFF_SECURE_URL● BFF_SECURE_URL: "mydelivery/v1/rendering/" = "mydelivery/v1/rendering/"
Defined in utils/urls.ts:9
<Const>
DEFAULT_PUBLIC_URL● DEFAULT_PUBLIC_URL: true
= true
Defined in utils/urls.ts:7
<Const>
USE_PUBLIC_URL● USE_PUBLIC_URL: BehaviorSubject
<boolean
> = new BehaviorSubject(DEFAULT_PUBLIC_URL)
Defined in utils/urls.ts:12
@ibm-wch-sdk/ng > "utils/wch.utils"
<Const>
KEY_ON_LAYOUT_MODE● KEY_ON_LAYOUT_MODE: "onLayoutMode" = "onLayoutMode"
Defined in utils/wch.utils.ts:12
<Const>
KEY_ON_RENDERING_CONTEXT● KEY_ON_RENDERING_CONTEXT: "onRenderingContext" = "onRenderingContext"
Defined in utils/wch.utils.ts:11
<Const>
LOGGER● LOGGER: "WchUtils" = "WchUtils"
Defined in utils/wch.utils.ts:9
▸ _getAppBaseHref(aBaseUrl?: HubInfoUrlProvider
, aDoc?: Document
): string
Defined in utils/wch.utils.ts:52
Decodes the base href of the application from the config or the doc fallback
Parameters:
Name | Type | Description |
---|---|---|
Optional aBaseUrl | HubInfoUrlProvider | the optional base URL |
Optional aDoc | Document | the document |
Returns: string
the path prefix that is supposed to be recognized as URLs
▸ _getAppBaseURL(aBaseUrl?: HubInfoUrlProvider
, aDoc?: Document
): string
Defined in utils/wch.utils.ts:34
Decodes the base href of the application from the config or the doc fallback
Parameters:
Name | Type | Description |
---|---|---|
Optional aBaseUrl | HubInfoUrlProvider | the optional base URL |
Optional aDoc | Document | the document |
Returns: string
the path prefix that is supposed to be recognized as URLs
▸ _getPrefix(aUrl: string
): string
Defined in utils/wch.utils.ts:20
Decodes the path prefix from the URL that is the starting segment
Parameters:
Name | Type | Description |
---|---|---|
aUrl | string | the potentially absolute URL |
Returns: string
the path prefix
▸ _getRenderingContextURL(aID: string
): Observable
<string
>
Defined in utils/wch.utils.ts:66
Parameters:
Name | Type |
---|---|
aID | string |
Returns: Observable
<string
>
▸ _getSiteURL(): Observable
<string
>
Defined in utils/wch.utils.ts:77
Returns: Observable
<string
>
<Const>
VERSIONVERSION: object
Defined in version.ts:1
● build: string
= "01a021c9-8427-4cdd-bdd1-18ad1dda695d"
Defined in version.ts:3
● version: string
= "f507579f-a7b0-4d70-9027-87aa5e35b020"
Defined in version.ts:2
This section lists the components exposed by the SDK:
The SDK exposes the following services:
Stories describing how to do interesting stuff with the @ibm-wch-sdk/ng
module.
The hub info service provides information about the entry URLs to WCH. It exposes the following information:
apiUrl
: URL to access the API layer, e.g. 'https://my.digitalexperience.ibm.com/api/345563cf-a83c-40e5-a065-1d6ff36b05c1'deliveryUrl
: URL to access the delivery layer, e.g. 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1'cycleHandlingStrategy?
: Specifies how the SDK deals with cyclic data structures, one of BREAK
or RESOLVE
.fetchLevels?
: Number of levels to fetch per request to the rendering context. If missing all levels will be fetched.httpOptions?
: Configuration of the HTTP strategy for the live site. Of type HttpResourceOptions
.httpPreviewOptions?
: Configuration of the HTTP strategy for the preview site. Of type HttpResourceOptions
.Note that the URLs may end with a slash, however this is not required.
pollTime?
: The system will periodically poll for updates. This setting configures the polling interval in [ms]. Consider to configure a different value for the live site and the preview site.pollTimeVariation?
: In order to avoid fetching many request at the same time, this settings allows to introduce a time window from which the polling interval will be selected randomly. Sensible values are between 0 and 1, relative to the pollTime
. Default is 0.15
.useLocalStorage?
: If enabled the system will try to load data from local storage before making an HTTP call. Defaults to true
.useBootstrap?
: If enabled the system will try to load inline data before making an HTTP call. Defaults to true
. Use the [Bootstrapservice][./../bootstrap] to add this data.useStaticResources?
: If enabled the system will try to load prerendered data from the delivery site before making an API call. This can lead to 404 responses that are logged in some browsers, however this is not an error. Defaults to true
.useApi?
: If enabled the system will load site data and content items from the WCH REST APIs. When disabled it will only use one of the methods mentioned above. Defaults to true
. Setting it to false
is not recommended for production scenarios, but rather for testing, e.g. performance testing.useJsonP?
: If enabled the system uses JSONP to load data. From a caching perspective this is more efficient than an XHR, because XHR requests are subject to CORS and as a consequence generate an origin specific cache entry. Defaults to true
.WchNgModule.forRoot({
apiUrl: new URL(apiUrl),
deliveryUrl: new URL(deliveryUrl)
});
alternative
import { environment } from '../environments/environment';
WchNgModule.forRoot(environment);
Assuming that the required settings are part of the environment
settings and the build uses the Angular CLI environment concepts.
We recommend to define the apiUrl
and the deliveryUrl
only for development mode, assuming that the application in production mode will be served from WCH. In that case, the system will detect the apiUrl
and the deliveryUrl
automatically. In case the production mode application will be served from a different server than WCH, make sure to add an explicit configuration of the URLs.
When maintaining a wchtools data folder with your application, this folder already has a .wchtoolsoptions.json
file that contains the API URL. We recommend to read this file and initialize the environment variables from that source, to avoid duplication.
Declare the .wchtoolsoptions.json
files as a modulein the typings.d.ts
file, e.g. like this:
declare module '*/.wchtoolsoptions.json' {
const value: any;
export default value;
}
In your environment.ts
read the module, e.g. like this:
import * as OPTIONS from './../../data/.wchtoolsoptions.json';
export const environment = {
production: false,
apiUrl: OPTIONS['x-ibm-dx-tenant-base-url'],
httpOptions: { pollTime: 10 * 20 * 1000 },
httpPreviewOptions: { pollTime: 10 * 1000 }
};
Note that it is sufficient to specify the apiUrl
property, the matching deliveryUrl
property will be derived from it, automatically.
Although the typical way to configure the WchNgModule is via its forRoot
method, all configuration options are handled as tokens of the dependency injector. This makes it possible to configure individual aspects on a granular level. The injection tokens are:
The SDK splits its functionality into a module that provides services and one that provides components and directives.
The service module exposes services.
The component module defines components and directives. Import this module from other modules that contain UI artifacts.
The contentref component acts as a proxy component and renders that component that is referenced by the RenderingContext.
The component requires the rendering context
to be injected.
Usage in HTML:
<wch-contentref [renderingContext]="..."></wch-contentref>
renderingContext
: the rendering context for the componentlayoutMode
: the layout mode used to render the component. If not specified the system uses a default.onComponent
: the actual angular component instance that gets createdonComponentOutput
: a proxied output event sent by the dynamically created component. This event will be wrapped into a ComponentOutput interface.The contentref component is similar to the PageComponent. The difference is that it receives its configuration information explicitly via a RenderingContext whereas the PageComponent gets the context via the indirection of the active route.
The component relies on the layouts
element in the RenderingContext. Depending on the type
the contentref component will select the correct component to instantiate:
Angular4
: uses the controller
field together with the ComponentService to locate a native Angular 4 component.handlebars
:Interface that wraps an event emitted by a dynamically created component.
renderingContext
: rendering context of the component emitting the eventlayoutMode
: layout mode of the component emitting the eventcomponent
: the actual component instance that emitted the eventoutput
: the output declaration representing the eventevent
: the emitted eventThis service allow to register components with layout IDs. Consider to use the inline form of the @LayoutComponent instead.
DEFAULT_LAYOUT
: name of the component rendered if the layout cannot be resolvedPAGE_NOT_FOUND_LAYOUT
: name of the component rendered if the page cannot be resolved
@ibm-wch-sdk/ng > "components/content/content.component" > ContentComponent
↳ ContentComponent
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
OnDestroy
RenderingContextProvider
⊕ new ContentComponent(aWchService: WchService): ContentComponent
Defined in components/content/content.component.ts:81
Parameters:
Name | Type |
---|---|
aWchService | WchService |
Returns: ContentComponent
● id: string
Defined in components/content/content.component.ts:44
● layoutMode: string
Defined in components/content/content.component.ts:52
● levels: string
| number
| null
| undefined
Defined in components/content/content.component.ts:58
● onComponent: ReplaySubject
<any
> = createSingleSubject()
Defined in components/content/content.component.ts:70
● onLayoutMode: Observable
<string
>
Defined in components/content/content.component.ts:76
● onRenderingContext: Observable
<RenderingContext
>
Defined in components/content/content.component.ts:64
● onState: Observable
<ComponentState>
Defined in components/content/content.component.ts:81
The component state
<Protected>
onAfterContentCheckedget onAfterContentChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:307
see: AfterContentChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterContentInitget onAfterContentInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:315
see: AfterContentInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewCheckedget onAfterViewChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:291
see: AfterViewChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewInitget onAfterViewInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:299
see: AfterViewInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onDoCheckget onDoCheck(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:323
see: DoCheck
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnChangesget onOnChanges(): Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:331
see: OnChanges
Returns: Observable
<SimpleChanges
>
the observable representation of this callback
<Protected>
onOnDestroyget onOnDestroy(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:347
see: OnDestroy
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnInitget onOnInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:339
see: OnInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
describeSetter▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in components/rendering/abstract.lifecycle.component.ts:374
Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component.
deprecated: use createSetter instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSubject | Subject <T > | the subject |
Returns: PropertyDescriptor
the property descriptor
▸ ngAfterContentChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:241
see: AfterContentChecked
override:
Returns: void
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:249
see: AfterContentInit
override:
Returns: void
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:225
see: AfterViewChecked
override:
Returns: void
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:233
see: AfterViewInit
override:
Returns: void
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:257
see: DoCheck
override:
Returns: void
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:265
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in components/content/content.component.ts:154
Returns: void
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:273
see: OnInit
override:
Returns: void
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in components/rendering/abstract.lifecycle.component.ts:393
Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.
deprecated: use takeUntil(onOnDestroy)
instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aObservable | Subscribable <T > | the observable to subscribe to |
Optional aObserver | PartialObserver <T > | function | string | the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance. |
Optional error | function | optional error handler |
Optional complete | function | optional completion handler |
Returns: void
<Protected>
unsubscribeOnDestroy▸ unsubscribeOnDestroy(aSubscription: Subscription
): void
Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:359
Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.
deprecated: use takeUntil(onOnDestroy)
instead
Parameters:
Name | Type | Description |
---|---|---|
aSubscription | Subscription | the subscription to unsubscribe on |
Returns: void
@ibm-wch-sdk/ng > "components/contentquery/contentquery.component" > ContentQueryComponent
↳ ContentQueryComponent
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
AfterViewInit
OnDestroy
⊕ new ContentQueryComponent(aRenderer: Renderer2
, aElement: ElementRef
, aWchService: WchService): ContentQueryComponent
Defined in components/contentquery/contentquery.component.ts:82
Parameters:
Name | Type |
---|---|
aRenderer | Renderer2 |
aElement | ElementRef |
aWchService | WchService |
Returns: ContentQueryComponent
● layoutMode: string
Defined in components/contentquery/contentquery.component.ts:57
● levels: string
| number
| null
| undefined
Defined in components/contentquery/contentquery.component.ts:67
● onLayoutMode: Observable
<string
>
Defined in components/contentquery/contentquery.component.ts:72
● onNumFound: Observable
<number
>
Defined in components/contentquery/contentquery.component.ts:82
● onRenderingContexts: Observable
<RenderingContext
[]>
Defined in components/contentquery/contentquery.component.ts:77
● query: QueryInput
Defined in components/contentquery/contentquery.component.ts:62
<Protected>
onAfterContentCheckedget onAfterContentChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:307
see: AfterContentChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterContentInitget onAfterContentInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:315
see: AfterContentInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewCheckedget onAfterViewChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:291
see: AfterViewChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewInitget onAfterViewInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:299
see: AfterViewInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onDoCheckget onDoCheck(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:323
see: DoCheck
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnChangesget onOnChanges(): Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:331
see: OnChanges
Returns: Observable
<SimpleChanges
>
the observable representation of this callback
<Protected>
onOnDestroyget onOnDestroy(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:347
see: OnDestroy
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnInitget onOnInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:339
see: OnInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
describeSetter▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in components/rendering/abstract.lifecycle.component.ts:374
Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component.
deprecated: use createSetter instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSubject | Subject <T > | the subject |
Returns: PropertyDescriptor
the property descriptor
▸ ngAfterContentChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:241
see: AfterContentChecked
override:
Returns: void
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:249
see: AfterContentInit
override:
Returns: void
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:225
see: AfterViewChecked
override:
Returns: void
▸ ngAfterViewInit(): void
Overrides AbstractLifeCycleComponent.ngAfterViewInit
Defined in components/contentquery/contentquery.component.ts:195
Returns: void
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:257
see: DoCheck
override:
Returns: void
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:265
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in components/contentquery/contentquery.component.ts:200
Returns: void
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:273
see: OnInit
override:
Returns: void
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in components/rendering/abstract.lifecycle.component.ts:393
Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.
deprecated: use takeUntil(onOnDestroy)
instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aObservable | Subscribable <T > | the observable to subscribe to |
Optional aObserver | PartialObserver <T > | function | string | the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance. |
Optional error | function | optional error handler |
Optional complete | function | optional completion handler |
Returns: void
<Protected>
unsubscribeOnDestroy▸ unsubscribeOnDestroy(aSubscription: Subscription
): void
Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:359
Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.
deprecated: use takeUntil(onOnDestroy)
instead
Parameters:
Name | Type | Description |
---|---|---|
aSubscription | Subscription | the subscription to unsubscribe on |
Returns: void
@ibm-wch-sdk/ng > "components/contentref/contentref.component" > ContentrefComponent
↳ ContentrefComponent
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
OnDestroy
RenderingContextProvider
OnDestroy
⊕ new ContentrefComponent(aCmp: ComponentsService, aMapping: LayoutMappingService, aWchService: WchService): ContentrefComponent
Overrides AbstractRenderingComponent.constructor
Defined in components/contentref/contentref.component.ts:122
Parameters:
Name | Type |
---|---|
aCmp | ComponentsService |
aMapping | LayoutMappingService |
aWchService | WchService |
Returns: ContentrefComponent
<Protected>
_id● _id: string
Inherited from AbstractRenderingComponent._id
Defined in components/rendering/abstract-rendering.component.ts:34
<Optional>
cycleHandlingStrategy● cycleHandlingStrategy: CYCLE_HANDLING
| string
Defined in components/contentref/contentref.component.ts:97
● layoutMode: string
Overrides AbstractRenderingComponent.layoutMode
Defined in components/contentref/contentref.component.ts:107
● onComponent: ReplaySubject
<any
> = createSingleSubject()
Defined in components/contentref/contentref.component.ts:112
Output that will be triggered when a new component was created
● onLayoutMode: Observable
<string
>
Inherited from AbstractRenderingComponent.onLayoutMode
Defined in components/rendering/abstract-rendering.component.ts:44
● onRenderingContext: Observable
<RenderingContext
>
Inherited from AbstractRenderingComponent.onRenderingContext
Defined in components/rendering/abstract-rendering.component.ts:39
● onState: Observable
<ComponentState>
Defined in components/contentref/contentref.component.ts:122
The component state
● onType: Observable
<ComponentTypeRef
<any
>>
Defined in components/contentref/contentref.component.ts:117
The current type to render
● renderingContext: RenderingContext
Overrides AbstractRenderingComponent.renderingContext
Defined in components/contentref/contentref.component.ts:102
<Protected>
contextget context(): Observable
<RenderingContext
>
Inherited from AbstractRenderingComponent.context
Defined in components/rendering/abstract-rendering.component.ts:141
Returns: Observable
<RenderingContext
>
<Protected>
onAfterContentCheckedget onAfterContentChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:307
see: AfterContentChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterContentInitget onAfterContentInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:315
see: AfterContentInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewCheckedget onAfterViewChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:291
see: AfterViewChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewInitget onAfterViewInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:299
see: AfterViewInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onDoCheckget onDoCheck(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:323
see: DoCheck
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnChangesget onOnChanges(): Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:331
see: OnChanges
Returns: Observable
<SimpleChanges
>
the observable representation of this callback
<Protected>
onOnDestroyget onOnDestroy(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:347
see: OnDestroy
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnInitget onOnInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:339
see: OnInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
describeSetter▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in components/rendering/abstract.lifecycle.component.ts:374
Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component.
deprecated: use createSetter instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSubject | Subject <T > | the subject |
Returns: PropertyDescriptor
the property descriptor
▸ ngAfterContentChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:241
see: AfterContentChecked
override:
Returns: void
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:249
see: AfterContentInit
override:
Returns: void
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:225
see: AfterViewChecked
override:
Returns: void
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:233
see: AfterViewInit
override:
Returns: void
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:257
see: DoCheck
override:
Returns: void
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:265
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
▸ ngOnDestroy(): void
Overrides AbstractRenderingComponent.ngOnDestroy
Defined in components/contentref/contentref.component.ts:184
Returns: void
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:273
see: OnInit
override:
Returns: void
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in components/rendering/abstract.lifecycle.component.ts:393
Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.
deprecated: use takeUntil(onOnDestroy)
instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aObservable | Subscribable <T > | the observable to subscribe to |
Optional aObserver | PartialObserver <T > | function | string | the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance. |
Optional error | function | optional error handler |
Optional complete | function | optional completion handler |
Returns: void
▸ trackByComponentId(aIndex: number
, aRenderingContext: RenderingContext
): string
Inherited from AbstractRenderingComponent.trackByComponentId
Defined in components/rendering/abstract-rendering.component.ts:153
Parameters:
Name | Type |
---|---|
aIndex | number |
aRenderingContext | RenderingContext |
Returns: string
<Protected>
unsubscribeOnDestroy▸ unsubscribeOnDestroy(aSubscription: Subscription
): void
Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:359
Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.
deprecated: use takeUntil(onOnDestroy)
instead
Parameters:
Name | Type | Description |
---|---|---|
aSubscription | Subscription | the subscription to unsubscribe on |
Returns: void
@ibm-wch-sdk/ng > "services/components/components.service" > ComponentsService
ComponentsService
OnDestroy
⊕ new ComponentsService(markupService: MarkupService): ComponentsService
Defined in services/components/components.service.ts:321
Parameters:
Name | Type |
---|---|
markupService | MarkupService |
Returns: ComponentsService
● getTypeByLayout: function
Defined in services/components/components.service.ts:301
▸(aLayout: Layout
, aLayoutMode?: string
): Observable
<ComponentTypeRef
<any
>>
Parameters:
Name | Type |
---|---|
aLayout | Layout |
Optional aLayoutMode | string |
Returns: Observable
<ComponentTypeRef
<any
>>
● getTypeBySelector: function
Defined in services/components/components.service.ts:313
▸(aSelector: string
, aLayoutMode?: string
): Observable
<ComponentTypeRef
<any
>>
Parameters:
Name | Type |
---|---|
aSelector | string |
Optional aLayoutMode | string |
Returns: Observable
<ComponentTypeRef
<any
>>
● ngOnDestroy: function
Defined in services/components/components.service.ts:321
▸(): void
Returns: void
● registerType: function
Defined in services/components/components.service.ts:288
▸(aController: string
| string
[], aType: ComponentTypeRef
<any
>, aLayoutModes?: string
| string
[]): void
Parameters:
Name | Type |
---|---|
aController | string | string [] |
aType | ComponentTypeRef <any > |
Optional aLayoutModes | string | string [] |
Returns: void
<Static>
DEFAULT_LAYOUT● DEFAULT_LAYOUT: "wch-default-layout" = _DEFAULT_LAYOUT
Defined in services/components/components.service.ts:280
<Static>
PAGE_NOT_FOUND_LAYOUT● PAGE_NOT_FOUND_LAYOUT: "wch-404" = _PAGE_NOT_FOUND_LAYOUT
Defined in services/components/components.service.ts:285
@ibm-wch-sdk/ng > "services/mappings/mappings.service" > LayoutMappingService
LayoutMappingService
OnDestroy
⊕ new LayoutMappingService(): LayoutMappingService
Defined in services/mappings/mappings.service.ts:302
Returns: LayoutMappingService
● getSelector: function
Defined in services/mappings/mappings.service.ts:294
▸(aLayoutMode: string
, aRenderingContext: RenderingContext
): string
| undefined
Parameters:
Name | Type |
---|---|
aLayoutMode | string |
aRenderingContext | RenderingContext |
Returns: string
| undefined
● ngOnDestroy: function
Defined in services/mappings/mappings.service.ts:302
▸(): void
Returns: void
● registerMapping: function
Defined in services/mappings/mappings.service.ts:281
▸(aId: string
| string
[], aSelector: string
| string
[] | Type
<any
>, aLayoutMode?: string
| string
[]): void
Parameters:
Name | Type |
---|---|
aId | string | string [] |
aSelector | string | string [] | Type <any > |
Optional aLayoutMode | string | string [] |
Returns: void
@ibm-wch-sdk/ng > "components/default/default.component" > DefaultComponent
DefaultComponent
@ibm-wch-sdk/ng > "components/page/page.component" > PageComponent
↳ PageComponent
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
RenderingContextProvider
OnDestroy
RenderingContextProvider
⊕ new PageComponent(aRoute: ActivatedRoute
, aWchService: WchService, aTitleService: Title
, aMetaService: Meta
): PageComponent
Overrides AbstractBaseComponent.constructor
Defined in components/page/page.component.ts:170
Parameters:
Name | Type |
---|---|
aRoute | ActivatedRoute |
aWchService | WchService |
aTitleService | Title |
aMetaService | Meta |
Returns: PageComponent
● layoutMode: string
Inherited from AbstractBaseComponent.layoutMode
Defined in components/rendering/abstract-base.component.ts:40
● onComponent: ReplaySubject
<any
> = createSingleSubject()
Defined in components/page/page.component.ts:165
● onLayoutMode: Observable
<string
>
Overrides AbstractBaseComponent.onLayoutMode
Defined in components/page/page.component.ts:154
● onRenderingContext: Observable
<RenderingContext
>
Overrides AbstractBaseComponent.onRenderingContext
Defined in components/page/page.component.ts:160
● onState: Observable
<ComponentState>
Defined in components/page/page.component.ts:170
The component state
<Protected>
onAfterContentCheckedget onAfterContentChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:307
see: AfterContentChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterContentInitget onAfterContentInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:315
see: AfterContentInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewCheckedget onAfterViewChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:291
see: AfterViewChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewInitget onAfterViewInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:299
see: AfterViewInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onDoCheckget onDoCheck(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:323
see: DoCheck
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnChangesget onOnChanges(): Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:331
see: OnChanges
Returns: Observable
<SimpleChanges
>
the observable representation of this callback
<Protected>
onOnDestroyget onOnDestroy(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:347
see: OnDestroy
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnInitget onOnInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:339
see: OnInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
describeSetter▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in components/rendering/abstract.lifecycle.component.ts:374
Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component.
deprecated: use createSetter instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSubject | Subject <T > | the subject |
Returns: PropertyDescriptor
the property descriptor
▸ ngAfterContentChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:241
see: AfterContentChecked
override:
Returns: void
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:249
see: AfterContentInit
override:
Returns: void
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:225
see: AfterViewChecked
override:
Returns: void
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:233
see: AfterViewInit
override:
Returns: void
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:257
see: DoCheck
override:
Returns: void
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:265
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in components/page/page.component.ts:217
Returns: void
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:273
see: OnInit
override:
Returns: void
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in components/rendering/abstract.lifecycle.component.ts:393
Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.
deprecated: use takeUntil(onOnDestroy)
instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aObservable | Subscribable <T > | the observable to subscribe to |
Optional aObserver | PartialObserver <T > | function | string | the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance. |
Optional error | function | optional error handler |
Optional complete | function | optional completion handler |
Returns: void
<Protected>
unsubscribeOnDestroy▸ unsubscribeOnDestroy(aSubscription: Subscription
): void
Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:359
Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.
deprecated: use takeUntil(onOnDestroy)
instead
Parameters:
Name | Type | Description |
---|---|---|
aSubscription | Subscription | the subscription to unsubscribe on |
Returns: void
@ibm-wch-sdk/ng > "components/pageref/pageref.component" > PagerefComponent
↳ PagerefComponent
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
OnDestroy
RenderingContextProvider
⊕ new PagerefComponent(aWchService: WchService): PagerefComponent
Defined in components/pageref/pageref.component.ts:73
Parameters:
Name | Type |
---|---|
aWchService | WchService |
Returns: PagerefComponent
● layoutMode: string
Defined in components/pageref/pageref.component.ts:48
● levels: string
| number
| null
| undefined
Defined in components/pageref/pageref.component.ts:53
● onComponent: ReplaySubject
<any
> = createSingleSubject()
Defined in components/pageref/pageref.component.ts:63
● onLayoutMode: Observable
<string
>
Defined in components/pageref/pageref.component.ts:68
● onRenderingContext: Observable
<RenderingContext
>
Defined in components/pageref/pageref.component.ts:58
● onState: Observable
<ComponentState>
Defined in components/pageref/pageref.component.ts:73
The component state
● sitePage: SitePage
Defined in components/pageref/pageref.component.ts:41
<Protected>
onAfterContentCheckedget onAfterContentChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:307
see: AfterContentChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterContentInitget onAfterContentInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:315
see: AfterContentInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewCheckedget onAfterViewChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:291
see: AfterViewChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewInitget onAfterViewInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:299
see: AfterViewInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onDoCheckget onDoCheck(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:323
see: DoCheck
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnChangesget onOnChanges(): Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:331
see: OnChanges
Returns: Observable
<SimpleChanges
>
the observable representation of this callback
<Protected>
onOnDestroyget onOnDestroy(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:347
see: OnDestroy
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnInitget onOnInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:339
see: OnInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
describeSetter▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in components/rendering/abstract.lifecycle.component.ts:374
Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component.
deprecated: use createSetter instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSubject | Subject <T > | the subject |
Returns: PropertyDescriptor
the property descriptor
▸ ngAfterContentChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:241
see: AfterContentChecked
override:
Returns: void
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:249
see: AfterContentInit
override:
Returns: void
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:225
see: AfterViewChecked
override:
Returns: void
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:233
see: AfterViewInit
override:
Returns: void
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:257
see: DoCheck
override:
Returns: void
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:265
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in components/pageref/pageref.component.ts:152
Returns: void
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:273
see: OnInit
override:
Returns: void
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in components/rendering/abstract.lifecycle.component.ts:393
Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.
deprecated: use takeUntil(onOnDestroy)
instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aObservable | Subscribable <T > | the observable to subscribe to |
Optional aObserver | PartialObserver <T > | function | string | the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance. |
Optional error | function | optional error handler |
Optional complete | function | optional completion handler |
Returns: void
<Protected>
unsubscribeOnDestroy▸ unsubscribeOnDestroy(aSubscription: Subscription
): void
Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:359
Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.
deprecated: use takeUntil(onOnDestroy)
instead
Parameters:
Name | Type | Description |
---|---|---|
aSubscription | Subscription | the subscription to unsubscribe on |
Returns: void
@ibm-wch-sdk/ng > "components/path/content.path.component" > ContentPathComponent
↳ ContentPathComponent
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
RenderingContextProvider
OnDestroy
RenderingContextProvider
⊕ new ContentPathComponent(aWchService: WchService): ContentPathComponent
Overrides AbstractBaseComponent.constructor
Defined in components/path/content.path.component.ts:67
Parameters:
Name | Type |
---|---|
aWchService | WchService |
Returns: ContentPathComponent
● layoutMode: string
Inherited from AbstractBaseComponent.layoutMode
Defined in components/rendering/abstract-base.component.ts:40
● levels: string
| number
| null
| undefined
Defined in components/path/content.path.component.ts:52
● onComponent: EventEmitter
<any
> = new EventEmitter()
Defined in components/path/content.path.component.ts:47
● onLayoutMode: Observable
<string
>
Overrides AbstractBaseComponent.onLayoutMode
Defined in components/path/content.path.component.ts:36
● onPath: Observable
<string
>
Defined in components/path/content.path.component.ts:62
● onRenderingContext: Observable
<RenderingContext
>
Overrides AbstractBaseComponent.onRenderingContext
Defined in components/path/content.path.component.ts:42
● onState: Observable
<ComponentState>
Defined in components/path/content.path.component.ts:67
The component state
● path: string
Defined in components/path/content.path.component.ts:57
<Protected>
onAfterContentCheckedget onAfterContentChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:307
see: AfterContentChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterContentInitget onAfterContentInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:315
see: AfterContentInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewCheckedget onAfterViewChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:291
see: AfterViewChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewInitget onAfterViewInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:299
see: AfterViewInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onDoCheckget onDoCheck(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:323
see: DoCheck
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnChangesget onOnChanges(): Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:331
see: OnChanges
Returns: Observable
<SimpleChanges
>
the observable representation of this callback
<Protected>
onOnDestroyget onOnDestroy(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:347
see: OnDestroy
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnInitget onOnInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:339
see: OnInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
describeSetter▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in components/rendering/abstract.lifecycle.component.ts:374
Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component.
deprecated: use createSetter instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSubject | Subject <T > | the subject |
Returns: PropertyDescriptor
the property descriptor
▸ ngAfterContentChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:241
see: AfterContentChecked
override:
Returns: void
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:249
see: AfterContentInit
override:
Returns: void
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:225
see: AfterViewChecked
override:
Returns: void
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:233
see: AfterViewInit
override:
Returns: void
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:257
see: DoCheck
override:
Returns: void
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:265
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in components/path/content.path.component.ts:122
Returns: void
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:273
see: OnInit
override:
Returns: void
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in components/rendering/abstract.lifecycle.component.ts:393
Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.
deprecated: use takeUntil(onOnDestroy)
instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aObservable | Subscribable <T > | the observable to subscribe to |
Optional aObserver | PartialObserver <T > | function | string | the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance. |
Optional error | function | optional error handler |
Optional complete | function | optional completion handler |
Returns: void
<Protected>
unsubscribeOnDestroy▸ unsubscribeOnDestroy(aSubscription: Subscription
): void
Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:359
Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.
deprecated: use takeUntil(onOnDestroy)
instead
Parameters:
Name | Type | Description |
---|---|---|
aSubscription | Subscription | the subscription to unsubscribe on |
Returns: void
@ibm-wch-sdk/ng > "components/rendering/abstract-base.component" > AbstractBaseComponent
↳ AbstractBaseComponent
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
RenderingContextProvider
⊕ new AbstractBaseComponent(): AbstractBaseComponent
Defined in components/rendering/abstract-base.component.ts:40
Returns: AbstractBaseComponent
● layoutMode: string
Defined in components/rendering/abstract-base.component.ts:40
● onLayoutMode: Observable
<string
>
Defined in components/rendering/abstract-base.component.ts:33
● onRenderingContext: Observable
<RenderingContext
>
Defined in components/rendering/abstract-base.component.ts:28
<Protected>
onAfterContentCheckedget onAfterContentChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:307
see: AfterContentChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterContentInitget onAfterContentInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:315
see: AfterContentInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewCheckedget onAfterViewChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:291
see: AfterViewChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewInitget onAfterViewInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:299
see: AfterViewInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onDoCheckget onDoCheck(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:323
see: DoCheck
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnChangesget onOnChanges(): Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:331
see: OnChanges
Returns: Observable
<SimpleChanges
>
the observable representation of this callback
<Protected>
onOnDestroyget onOnDestroy(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:347
see: OnDestroy
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnInitget onOnInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:339
see: OnInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
describeSetter▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in components/rendering/abstract.lifecycle.component.ts:374
Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component.
deprecated: use createSetter instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSubject | Subject <T > | the subject |
Returns: PropertyDescriptor
the property descriptor
▸ ngAfterContentChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:241
see: AfterContentChecked
override:
Returns: void
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:249
see: AfterContentInit
override:
Returns: void
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:225
see: AfterViewChecked
override:
Returns: void
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:233
see: AfterViewInit
override:
Returns: void
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:257
see: DoCheck
override:
Returns: void
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:265
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
▸ ngOnDestroy(): void
Inherited from AbstractLifeCycleComponent.ngOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:281
see: OnDestroy
override:
Returns: void
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:273
see: OnInit
override:
Returns: void
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in components/rendering/abstract.lifecycle.component.ts:393
Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.
deprecated: use takeUntil(onOnDestroy)
instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aObservable | Subscribable <T > | the observable to subscribe to |
Optional aObserver | PartialObserver <T > | function | string | the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance. |
Optional error | function | optional error handler |
Optional complete | function | optional completion handler |
Returns: void
<Protected>
unsubscribeOnDestroy▸ unsubscribeOnDestroy(aSubscription: Subscription
): void
Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:359
Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.
deprecated: use takeUntil(onOnDestroy)
instead
Parameters:
Name | Type | Description |
---|---|---|
aSubscription | Subscription | the subscription to unsubscribe on |
Returns: void
@ibm-wch-sdk/ng > "components/rendering/abstract-rendering.component" > AbstractRenderingComponent
↳ AbstractRenderingComponent
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
OnDestroy
RenderingContextProvider
⊕ new AbstractRenderingComponent(): AbstractRenderingComponent
Defined in components/rendering/abstract-rendering.component.ts:54
Returns: AbstractRenderingComponent
<Protected>
_id● _id: string
Defined in components/rendering/abstract-rendering.component.ts:34
● layoutMode: string
Defined in components/rendering/abstract-rendering.component.ts:54
The current layout mode for convenience
● onLayoutMode: Observable
<string
>
Defined in components/rendering/abstract-rendering.component.ts:44
● onRenderingContext: Observable
<RenderingContext
>
Defined in components/rendering/abstract-rendering.component.ts:39
● renderingContext: RenderingContext
Defined in components/rendering/abstract-rendering.component.ts:49
The current rendering context for convenience
<Protected>
contextget context(): Observable
<RenderingContext
>
Defined in components/rendering/abstract-rendering.component.ts:141
Returns: Observable
<RenderingContext
>
<Protected>
onAfterContentCheckedget onAfterContentChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:307
see: AfterContentChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterContentInitget onAfterContentInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:315
see: AfterContentInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewCheckedget onAfterViewChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:291
see: AfterViewChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewInitget onAfterViewInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:299
see: AfterViewInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onDoCheckget onDoCheck(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:323
see: DoCheck
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnChangesget onOnChanges(): Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:331
see: OnChanges
Returns: Observable
<SimpleChanges
>
the observable representation of this callback
<Protected>
onOnDestroyget onOnDestroy(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:347
see: OnDestroy
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnInitget onOnInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:339
see: OnInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
describeSetter▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in components/rendering/abstract.lifecycle.component.ts:374
Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component.
deprecated: use createSetter instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSubject | Subject <T > | the subject |
Returns: PropertyDescriptor
the property descriptor
▸ ngAfterContentChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:241
see: AfterContentChecked
override:
Returns: void
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:249
see: AfterContentInit
override:
Returns: void
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:225
see: AfterViewChecked
override:
Returns: void
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:233
see: AfterViewInit
override:
Returns: void
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:257
see: DoCheck
override:
Returns: void
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:265
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in components/rendering/abstract-rendering.component.ts:162
Returns: void
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:273
see: OnInit
override:
Returns: void
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in components/rendering/abstract.lifecycle.component.ts:393
Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.
deprecated: use takeUntil(onOnDestroy)
instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aObservable | Subscribable <T > | the observable to subscribe to |
Optional aObserver | PartialObserver <T > | function | string | the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance. |
Optional error | function | optional error handler |
Optional complete | function | optional completion handler |
Returns: void
▸ trackByComponentId(aIndex: number
, aRenderingContext: RenderingContext
): string
Defined in components/rendering/abstract-rendering.component.ts:153
Parameters:
Name | Type |
---|---|
aIndex | number |
aRenderingContext | RenderingContext |
Returns: string
<Protected>
unsubscribeOnDestroy▸ unsubscribeOnDestroy(aSubscription: Subscription
): void
Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:359
Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.
deprecated: use takeUntil(onOnDestroy)
instead
Parameters:
Name | Type | Description |
---|---|---|
aSubscription | Subscription | the subscription to unsubscribe on |
Returns: void
@ibm-wch-sdk/ng > "components/rendering/abstract.lifecycle.component" > AbstractLifeCycleComponent
Base class that allows to register life cycle hooks. This class is supposed to be subclassed before use.
The 'ngXXX' methods override the methods from the Angular life cycle interfaces. If you overridde any of these methods make sure to call the super method.
The 'onXXX' methods expose observables that will be triggered when the life cycle method occurs. This is a convenient way to register hooks in the constructor of a subclass without having to override any method.
The {@link #onOnDestroy} observable is especially useful, since it can be used as a termination signal for automatic unsubscriptions via the http://reactivex.io/documentation/operators/takeuntil.html operation.
Note that hooks such as onOnInit
and onOnDestroy
only fire once. If you depend on such a hook in an observable chain more than once make sure to share the emissions (typically via shareReplay
)
AbstractLifeCycleComponent
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
<Protected>
onAfterContentCheckedget onAfterContentChecked(): Observable
<void
>
Defined in components/rendering/abstract.lifecycle.component.ts:307
see: AfterContentChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterContentInitget onAfterContentInit(): Observable
<void
>
Defined in components/rendering/abstract.lifecycle.component.ts:315
see: AfterContentInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewCheckedget onAfterViewChecked(): Observable
<void
>
Defined in components/rendering/abstract.lifecycle.component.ts:291
see: AfterViewChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewInitget onAfterViewInit(): Observable
<void
>
Defined in components/rendering/abstract.lifecycle.component.ts:299
see: AfterViewInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onDoCheckget onDoCheck(): Observable
<void
>
Defined in components/rendering/abstract.lifecycle.component.ts:323
see: DoCheck
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnChangesget onOnChanges(): Observable
<SimpleChanges
>
Defined in components/rendering/abstract.lifecycle.component.ts:331
see: OnChanges
Returns: Observable
<SimpleChanges
>
the observable representation of this callback
<Protected>
onOnDestroyget onOnDestroy(): Observable
<void
>
Defined in components/rendering/abstract.lifecycle.component.ts:347
see: OnDestroy
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnInitget onOnInit(): Observable
<void
>
Defined in components/rendering/abstract.lifecycle.component.ts:339
see: OnInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
describeSetter▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Defined in components/rendering/abstract.lifecycle.component.ts:374
Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component.
deprecated: use createSetter instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSubject | Subject <T > | the subject |
Returns: PropertyDescriptor
the property descriptor
▸ ngAfterContentChecked(): void
Defined in components/rendering/abstract.lifecycle.component.ts:241
see: AfterContentChecked
override:
Returns: void
▸ ngAfterContentInit(): void
Defined in components/rendering/abstract.lifecycle.component.ts:249
see: AfterContentInit
override:
Returns: void
▸ ngAfterViewChecked(): void
Defined in components/rendering/abstract.lifecycle.component.ts:225
see: AfterViewChecked
override:
Returns: void
▸ ngAfterViewInit(): void
Defined in components/rendering/abstract.lifecycle.component.ts:233
see: AfterViewInit
override:
Returns: void
▸ ngDoCheck(): void
Defined in components/rendering/abstract.lifecycle.component.ts:257
see: DoCheck
override:
Returns: void
▸ ngOnChanges(changes: SimpleChanges
): void
Defined in components/rendering/abstract.lifecycle.component.ts:265
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
▸ ngOnDestroy(): void
Defined in components/rendering/abstract.lifecycle.component.ts:281
see: OnDestroy
override:
Returns: void
▸ ngOnInit(): void
Defined in components/rendering/abstract.lifecycle.component.ts:273
see: OnInit
override:
Returns: void
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Defined in components/rendering/abstract.lifecycle.component.ts:393
Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.
deprecated: use takeUntil(onOnDestroy)
instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aObservable | Subscribable <T > | the observable to subscribe to |
Optional aObserver | PartialObserver <T > | function | string | the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance. |
Optional error | function | optional error handler |
Optional complete | function | optional completion handler |
Returns: void
<Protected>
unsubscribeOnDestroy▸ unsubscribeOnDestroy(aSubscription: Subscription
): void
Defined in components/rendering/abstract.lifecycle.component.ts:359
Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.
deprecated: use takeUntil(onOnDestroy)
instead
Parameters:
Name | Type | Description |
---|---|---|
aSubscription | Subscription | the subscription to unsubscribe on |
Returns: void
@ibm-wch-sdk/ng > "components/site/site.component" > SiteComponent
↳ SiteComponent
OnInit
OnDestroy
OnChanges
DoCheck
AfterContentInit
AfterContentChecked
AfterViewInit
AfterViewChecked
RenderingContextProvider
OnDestroy
RenderingContextProvider
⊕ new SiteComponent(aWchService: WchService): SiteComponent
Overrides AbstractBaseComponent.constructor
Defined in components/site/site.component.ts:34
Parameters:
Name | Type |
---|---|
aWchService | WchService |
Returns: SiteComponent
● layoutMode: string
Inherited from AbstractBaseComponent.layoutMode
Defined in components/rendering/abstract-base.component.ts:40
● onComponent: EventEmitter
<any
> = new EventEmitter()
Defined in components/site/site.component.ts:34
● onLayoutMode: Observable
<string
>
Overrides AbstractBaseComponent.onLayoutMode
Defined in components/site/site.component.ts:23
● onRenderingContext: Observable
<RenderingContext
>
Overrides AbstractBaseComponent.onRenderingContext
Defined in components/site/site.component.ts:29
<Protected>
onAfterContentCheckedget onAfterContentChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:307
see: AfterContentChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterContentInitget onAfterContentInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:315
see: AfterContentInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewCheckedget onAfterViewChecked(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:291
see: AfterViewChecked
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onAfterViewInitget onAfterViewInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:299
see: AfterViewInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onDoCheckget onDoCheck(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:323
see: DoCheck
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnChangesget onOnChanges(): Observable
<SimpleChanges
>
Inherited from AbstractLifeCycleComponent.onOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:331
see: OnChanges
Returns: Observable
<SimpleChanges
>
the observable representation of this callback
<Protected>
onOnDestroyget onOnDestroy(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:347
see: OnDestroy
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
onOnInitget onOnInit(): Observable
<void
>
Inherited from AbstractLifeCycleComponent.onOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:339
see: OnInit
Returns: Observable
<void
>
the observable representation of this callback
<Protected>
describeSetter▸ describeSetter<T
>(aSubject: Subject
<T
>): PropertyDescriptor
Inherited from AbstractLifeCycleComponent.describeSetter
Defined in components/rendering/abstract.lifecycle.component.ts:374
Returns a property descriptor for a setter that dispatches to the given subject. The subject will automatically be completed and unsubscribed on the onDestroy method. The resulting descriptor may be used to define input properties in the closure of the constructor of a component.
deprecated: use createSetter instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aSubject | Subject <T > | the subject |
Returns: PropertyDescriptor
the property descriptor
▸ ngAfterContentChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentChecked
Defined in components/rendering/abstract.lifecycle.component.ts:241
see: AfterContentChecked
override:
Returns: void
▸ ngAfterContentInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterContentInit
Defined in components/rendering/abstract.lifecycle.component.ts:249
see: AfterContentInit
override:
Returns: void
▸ ngAfterViewChecked(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewChecked
Defined in components/rendering/abstract.lifecycle.component.ts:225
see: AfterViewChecked
override:
Returns: void
▸ ngAfterViewInit(): void
Inherited from AbstractLifeCycleComponent.ngAfterViewInit
Defined in components/rendering/abstract.lifecycle.component.ts:233
see: AfterViewInit
override:
Returns: void
▸ ngDoCheck(): void
Inherited from AbstractLifeCycleComponent.ngDoCheck
Defined in components/rendering/abstract.lifecycle.component.ts:257
see: DoCheck
override:
Returns: void
▸ ngOnChanges(changes: SimpleChanges
): void
Inherited from AbstractLifeCycleComponent.ngOnChanges
Defined in components/rendering/abstract.lifecycle.component.ts:265
see: OnChanges
override:
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
▸ ngOnDestroy(): void
Overrides AbstractLifeCycleComponent.ngOnDestroy
Defined in components/site/site.component.ts:52
Returns: void
▸ ngOnInit(): void
Inherited from AbstractLifeCycleComponent.ngOnInit
Defined in components/rendering/abstract.lifecycle.component.ts:273
see: OnInit
override:
Returns: void
▸ safeSubscribe<T
>(aObservable: Subscribable
<T
>, aObserver?: PartialObserver
<T
> | function
| string
, error?: function
, complete?: function
): void
Inherited from AbstractLifeCycleComponent.safeSubscribe
Defined in components/rendering/abstract.lifecycle.component.ts:393
Subscribes to an observable and makes sure to clean the subscription in ngOnDestroy to avoid memory leaks.
deprecated: use takeUntil(onOnDestroy)
instead
Type parameters:
Parameters:
Name | Type | Description |
---|---|---|
aObservable | Subscribable <T > | the observable to subscribe to |
Optional aObserver | PartialObserver <T > | function | string | the handler. If this value is a 'string', then the subscription will automatically update the respective property on the instance. |
Optional error | function | optional error handler |
Optional complete | function | optional completion handler |
Returns: void
<Protected>
unsubscribeOnDestroy▸ unsubscribeOnDestroy(aSubscription: Subscription
): void
Inherited from AbstractLifeCycleComponent.unsubscribeOnDestroy
Defined in components/rendering/abstract.lifecycle.component.ts:359
Unsubscribes the given subscription in the ngOnDestroy method. This method exists for convenience only, consider to use the {@link #safeSubscribe} method instead.
deprecated: use takeUntil(onOnDestroy)
instead
Parameters:
Name | Type | Description |
---|---|---|
aSubscription | Subscription | the subscription to unsubscribe on |
Returns: void
@ibm-wch-sdk/ng > "decorators/bootstrap/rendering.context.bootstrap.directive" > ContentWithLayoutBootstrapDirective
ContentWithLayoutBootstrapDirective
@ibm-wch-sdk/ng > "decorators/bootstrap/site.bootstrap.directive" > SiteBootstrapDirective
SiteBootstrapDirective
<Optional>
siteId● siteId: string
Defined in decorators/bootstrap/site.bootstrap.directive.ts:7
@ibm-wch-sdk/ng > "decorators/layout/layout.decorator" > Binding
Binding
● name: string
Defined in decorators/layout/layout.decorator.ts:57
● observable: Observable
<T
>
Defined in decorators/layout/layout.decorator.ts:58
● subscription: Subscription
Defined in decorators/layout/layout.decorator.ts:59
● value: T
Defined in decorators/layout/layout.decorator.ts:60
@ibm-wch-sdk/ng > "decorators/layout/layout.directive" > LayoutComponentDirective
LayoutComponentDirective
<Optional>
componentFactoryResolver● componentFactoryResolver: ComponentFactoryResolver
Defined in decorators/layout/layout.directive.ts:31
The optional component factory resolver used to instantiate the component
<Optional>
layoutMode● layoutMode: string
| string
[]
Defined in decorators/layout/layout.directive.ts:26
<Optional>
mappingId● mappingId: string
| string
[]
Defined in decorators/layout/layout.directive.ts:21
<Optional>
selector● selector: string
| string
[]
Defined in decorators/layout/layout.directive.ts:14
@ibm-wch-sdk/ng > "decorators/layout/layout.directive" > LayoutMappingDirective
LayoutMappingDirective
<Optional>
id● id: string
| string
[]
Defined in decorators/layout/layout.directive.ts:58
Type IDs or content IDs to map this to
<Optional>
kind● kind: CONTENT_ITEM_KIND
| CONTENT_ITEM_KIND
[]
Defined in decorators/layout/layout.directive.ts:63
Type IDs to map this to
<Optional>
layoutMode● layoutMode: string
| string
[]
Defined in decorators/layout/layout.directive.ts:53
<Optional>
selector● selector: string
| string
[]
Defined in decorators/layout/layout.directive.ts:48
@ibm-wch-sdk/ng > "directives/contentref.directive" > ContentRefDirective
ContentRefDirective
OnChanges
OnDestroy
⊕ new ContentRefDirective(_viewContainerRef: ViewContainerRef
, _cmpResolver: ComponentFactoryResolver
, _activatedRoute: ActivatedRoute
): ContentRefDirective
Defined in directives/contentref.directive.ts:83
Parameters:
Name | Type |
---|---|
_viewContainerRef | ViewContainerRef |
_cmpResolver | ComponentFactoryResolver |
_activatedRoute | ActivatedRoute |
Returns: ContentRefDirective
<Private>``<Optional>
_cc● _cc: ComponentRef
<any
>
Defined in directives/contentref.directive.ts:83
The currently used component
<Private>``<Optional>
_cr● _cr: ComponentFactoryResolver
Defined in directives/contentref.directive.ts:73
The currently used resolver
<Private>``<Optional>
_ct● _ct: ComponentTypeRef
<any
>
Defined in directives/contentref.directive.ts:78
The currently used type
<Private>
_r● _r: ComponentFactoryResolver
Defined in directives/contentref.directive.ts:68
The default component factory resolver
<Private>
_viewContainerRef● _viewContainerRef: ViewContainerRef
Defined in directives/contentref.directive.ts:86
● cmpResolver: ComponentFactoryResolver
Defined in directives/contentref.directive.ts:49
● layoutMode: string
Defined in directives/contentref.directive.ts:58
● onComponent: Subject
<any
> = createSingleSubject()
Defined in directives/contentref.directive.ts:63
Output that will be triggered when a new component was created
● renderingContext: RenderingContext
Defined in directives/contentref.directive.ts:53
● wchContentRef: ComponentTypeRef
<any
>
Defined in directives/contentref.directive.ts:47
▸ ngOnChanges(changes: SimpleChanges
): void
Defined in directives/contentref.directive.ts:98
Parameters:
Name | Type |
---|---|
changes | SimpleChanges |
Returns: void
▸ ngOnDestroy(): void
Defined in directives/contentref.directive.ts:165
Returns: void
@ibm-wch-sdk/ng > "guards/root.page.guard" > SelectFirstRootPageGuard
SelectFirstRootPageGuard
CanActivate
⊕ new SelectFirstRootPageGuard(aSearchService: SearchService, aRouter: Router
): SelectFirstRootPageGuard
Defined in guards/root.page.guard.ts:22
Parameters:
Name | Type |
---|---|
aSearchService | SearchService |
aRouter | Router |
Returns: SelectFirstRootPageGuard
<Private>
aRouter● aRouter: Router
Defined in guards/root.page.guard.ts:23
<Private>
aSearchService● aSearchService: SearchService
Defined in guards/root.page.guard.ts:23
▸ canActivate(route: ActivatedRouteSnapshot
, state: RouterStateSnapshot
): Observable
<boolean
>
Defined in guards/root.page.guard.ts:25
Parameters:
Name | Type |
---|---|
route | ActivatedRouteSnapshot |
state | RouterStateSnapshot |
Returns: Observable
<boolean
>
@ibm-wch-sdk/ng > "interfaces/hub-context" > HubContext
HubContext
● apiUrl: URL
Defined in interfaces/hub-context.ts:10
● deliveryUrl: URL
Defined in interfaces/hub-context.ts:17
<Optional>
isPreviewMode● isPreviewMode: boolean
Defined in interfaces/hub-context.ts:22
@ibm-wch-sdk/ng > "module" > WchNgModule
WchNgModule
⊕ new WchNgModule(parentModule: WchNgModule, loggerService: LoggerProxy, depService: DependencyService): WchNgModule
Defined in module.ts:145
Parameters:
Name | Type |
---|---|
parentModule | WchNgModule |
loggerService | LoggerProxy |
depService | DependencyService |
Returns: WchNgModule
<Static>
forRoot▸ forRoot(aService?: HubInfoConfig
): ModuleWithProviders
Defined in module.ts:55
Parameters:
Name | Type |
---|---|
Optional aService | HubInfoConfig |
Returns: ModuleWithProviders
@ibm-wch-sdk/ng > "modules/components.module" > WchNgComponentsModule
WchNgComponentsModule
@ibm-wch-sdk/ng > "modules/services.module" > WchNgServicesModule
WchNgServicesModule
⊕ new WchNgServicesModule(parentModule: WchNgServicesModule, loggerService: LoggerProxy, depService: DependencyService): WchNgServicesModule
Defined in modules/services.module.ts:18
Parameters:
Name | Type |
---|---|
parentModule | WchNgServicesModule |
loggerService | LoggerProxy |
depService | DependencyService |
Returns: WchNgServicesModule
@ibm-wch-sdk/ng > "services/config/application.config.service" > ApplicationConfigService
ApplicationConfigService
⊕ new ApplicationConfigService(wchService: WchService): ApplicationConfigService
Defined in services/config/application.config.service.ts:12
Parameters:
Name | Type |
---|---|
wchService | WchService |
Returns: ApplicationConfigService
<Private>
wchService● wchService: WchService
Defined in services/config/application.config.service.ts:14
get appConfig(): Observable
<ApplicationConfig>
Defined in services/config/application.config.service.ts:17
Returns: Observable
<ApplicationConfig>
@ibm-wch-sdk/ng > "services/dependency/dependency.service" > DependencyService
DependencyService
OnDestroy
⊕ new DependencyService(loggerService: WchLoggerService, router: Router
, urlsService: UrlsService, wchService: WchService, aInjector: Injector
): DependencyService
Defined in services/dependency/dependency.service.ts:22
Parameters:
Name | Type |
---|---|
loggerService | WchLoggerService |
router | Router |
urlsService | UrlsService |
wchService | WchService |
aInjector | Injector |
Returns: DependencyService
<Private>
_sdk● _sdk: Sdk
Defined in services/dependency/dependency.service.ts:22
● ngOnDestroy: function
Defined in services/dependency/dependency.service.ts:20
▸(): void
Returns: void
get sdk(): Sdk
Defined in services/dependency/dependency.service.ts:85
Returns: Sdk
@ibm-wch-sdk/ng > "services/dependency/message/sdk.navigate.by.path.message" > SdkNavigateByPathHandler
Executes a navigation event
SdkNavigateByPathHandler
SdkMessageHandler
⊕ new SdkNavigateByPathHandler(router: Router
, loggerService: WchLoggerService): SdkNavigateByPathHandler
Defined in services/dependency/message/sdk.navigate.by.path.message.ts:17
Parameters:
Name | Type |
---|---|
router | Router |
loggerService | WchLoggerService |
Returns: SdkNavigateByPathHandler
● handle: SdkMessageHandlerCallback
Defined in services/dependency/message/sdk.navigate.by.path.message.ts:17
@ibm-wch-sdk/ng > "services/dependency/message/sdk.refresh.message" > SdkRefreshHandler
Executes a refresh event
SdkRefreshHandler
SdkMessageHandler
⊕ new SdkRefreshHandler(refreshService: RefreshService, loggerService: WchLoggerService): SdkRefreshHandler
Defined in services/dependency/message/sdk.refresh.message.ts:17
Parameters:
Name | Type |
---|---|
refreshService | RefreshService |
loggerService | WchLoggerService |
Returns: SdkRefreshHandler
● handle: SdkMessageHandlerCallback
Defined in services/dependency/message/sdk.refresh.message.ts:17
@ibm-wch-sdk/ng > "services/dependency/message/sdk.set.mode.message" > SdkSetModeHandler
Executes a navigation event
SdkSetModeHandler
SdkMessageHandler
⊕ new SdkSetModeHandler(loggerService: WchLoggerService): SdkSetModeHandler
Defined in services/dependency/message/sdk.set.mode.message.ts:17
Parameters:
Name | Type |
---|---|
loggerService | WchLoggerService |
Returns: SdkSetModeHandler
● handle: SdkMessageHandlerCallback
Defined in services/dependency/message/sdk.set.mode.message.ts:17
@ibm-wch-sdk/ng > "services/dependency/message/sdk.subscribe.message" > SdkUnsubscribeHandler
Subscribes to the active route
SdkUnsubscribeHandler
SdkMessageHandler
⊕ new SdkUnsubscribeHandler(loggerService: WchLoggerService): SdkUnsubscribeHandler
Defined in services/dependency/message/sdk.subscribe.message.ts:16
Parameters:
Name | Type |
---|---|
loggerService | WchLoggerService |
Returns: SdkUnsubscribeHandler
● handle: SdkMessageHandlerCallback
Defined in services/dependency/message/sdk.subscribe.message.ts:16
@ibm-wch-sdk/ng > "services/dependency/message/sdk.subscribe.active.route.message" > SdkSubscribeActiveRouteHandler
Subscribes to the active route
SdkSubscribeActiveRouteHandler
SdkMessageHandler
⊕ new SdkSubscribeActiveRouteHandler(activePageService: ActivePageService, loggerService: WchLoggerService): SdkSubscribeActiveRouteHandler
Defined in services/dependency/message/sdk.subscribe.active.route.message.ts:16
Parameters:
Name | Type |
---|---|
activePageService | ActivePageService |
loggerService | WchLoggerService |
Returns: SdkSubscribeActiveRouteHandler
● handle: SdkMessageHandlerCallback
Defined in services/dependency/message/sdk.subscribe.active.route.message.ts:16
@ibm-wch-sdk/ng > "services/dependency/message/sdk.subscribe.mode.message" > SdkSubscribeModeHandler
Subscribes to the active mode
SdkSubscribeModeHandler
SdkMessageHandler
⊕ new SdkSubscribeModeHandler(loggerService: WchLoggerService): SdkSubscribeModeHandler
Defined in services/dependency/message/sdk.subscribe.mode.message.ts:16
Parameters:
Name | Type |
---|---|
loggerService | WchLoggerService |
Returns: SdkSubscribeModeHandler
● handle: SdkMessageHandlerCallback
Defined in services/dependency/message/sdk.subscribe.mode.message.ts:16
@ibm-wch-sdk/ng > "services/dependency/message/sdk.subscribe.route.message" > SdkSubscribeRouteHandler
Subscribes to a given route
SdkSubscribeRouteHandler
SdkMessageHandler
⊕ new SdkSubscribeRouteHandler(wchService: WchService, loggerService: WchLoggerService): SdkSubscribeRouteHandler
Defined in services/dependency/message/sdk.subscribe.route.message.ts:18
Parameters:
Name | Type |
---|---|
wchService | WchService |
loggerService | WchLoggerService |
Returns: SdkSubscribeRouteHandler
● handle: SdkMessageHandlerCallback
Defined in services/dependency/message/sdk.subscribe.route.message.ts:18
@ibm-wch-sdk/ng > "services/dependency/sdk/jsonp/jsonp" > SdkJsonp
SdkJsonp
⊕ new SdkJsonp(aDeps: SdkJsonpDependencies): SdkJsonp
Defined in services/dependency/sdk/jsonp/jsonp.ts:113
Parameters:
Name | Type |
---|---|
aDeps | SdkJsonpDependencies |
Returns: SdkJsonp
● addCallback: function
Defined in services/dependency/sdk/jsonp/jsonp.ts:100
▸(aUrl: string
, aCallback: JsonpCallback): string
Parameters:
Name | Type |
---|---|
aUrl | string |
aCallback | JsonpCallback |
Returns: string
● callback: JsonpCallbacks
Defined in services/dependency/sdk/jsonp/jsonp.ts:91
● destroy: function
Defined in services/dependency/sdk/jsonp/jsonp.ts:113
▸(): void
Returns: void
● removeCallback: function
Defined in services/dependency/sdk/jsonp/jsonp.ts:108
▸(aDigest: string
): boolean
Parameters:
Name | Type |
---|---|
aDigest | string |
Returns: boolean
@ibm-wch-sdk/ng > "services/dependency/sdk/jsonp/jsonp" > JsonpCallbacks
JsonpCallbacks
[url: string
]: JsonpCallback
@ibm-wch-sdk/ng > "services/dependency/sdk/jsonp/jsonp" > SdkJsonpDependencies
SdkJsonpDependencies
● urlsService: UrlConfig
Defined in services/dependency/sdk/jsonp/jsonp.ts:19
@ibm-wch-sdk/ng > "services/dependency/sdk/router/router" > SdkRouter
SdkRouter
WchSdkRouter
⊕ new SdkRouter(aDeps: SdkRouterDependencies): SdkRouter
Defined in services/dependency/sdk/router/router.ts:37
Parameters:
Name | Type |
---|---|
aDeps | SdkRouterDependencies |
Returns: SdkRouter
● activeRenderingContext: function
Defined in services/dependency/sdk/router/router.ts:35
▸(): Observable
<RenderingContext
>
Returns: Observable
<RenderingContext
>
● activeRoute: function
Defined in services/dependency/sdk/router/router.ts:28
▸(): Observable
<SitePage
>
Returns: Observable
<SitePage
>
● destroy: function
Defined in services/dependency/sdk/router/router.ts:37
▸(): void
Returns: void
● navigateByPath: function
Defined in services/dependency/sdk/router/router.ts:21
▸(aPath: string
): PromiseLike
<boolean
>
Parameters:
Name | Type |
---|---|
aPath | string |
Returns: PromiseLike
<boolean
>
@ibm-wch-sdk/ng > "services/dependency/sdk/router/router" > SdkRouterDependencies
SdkRouterDependencies
● router: Router
Defined in services/dependency/sdk/router/router.ts:15
@ibm-wch-sdk/ng > "services/dependency/sdk/version" > SdkVersion
WchSdkVersion
↳ SdkVersion
● build: Date
Overrides WchSdkVersion.build
Defined in services/dependency/sdk/version.ts:9
● version: Version
Overrides WchSdkVersion.version
Defined in services/dependency/sdk/version.ts:8
@ibm-wch-sdk/ng > "services/dependency/sdk/sdk" > Sdk
Sdk
WchSdk
⊕ new Sdk(aDeps: SdkDependencies): Sdk
Defined in services/dependency/sdk/sdk.ts:54
Parameters:
Name | Type |
---|---|
aDeps | SdkDependencies |
Returns: Sdk
● destroy: function
Defined in services/dependency/sdk/sdk.ts:46
▸(): void
Returns: void
● refresh: function
Defined in services/dependency/sdk/sdk.ts:42
▸(): void
Returns: void
<Private>
sdkJsonp● sdkJsonp: SdkJsonp
Defined in services/dependency/sdk/sdk.ts:50
<Private>
sdkLogger● sdkLogger: LoggerService
Defined in services/dependency/sdk/sdk.ts:52
<Private>
sdkRouter● sdkRouter: SdkRouter
Defined in services/dependency/sdk/sdk.ts:48
<Private>
sdkSearch● sdkSearch: SdkSearch
Defined in services/dependency/sdk/sdk.ts:54
<Static>
MODULE_NAME● MODULE_NAME: "WchSdk" = _MODULE_NAME
Defined in services/dependency/sdk/sdk.ts:35
get jsonp(): SdkJsonp
Defined in services/dependency/sdk/sdk.ts:134
Returns: SdkJsonp
get logger(): LoggerService
Defined in services/dependency/sdk/sdk.ts:138
Returns: LoggerService
get router(): SdkRouter
Defined in services/dependency/sdk/sdk.ts:130
Returns: SdkRouter
get search(): SdkSearch
Defined in services/dependency/sdk/sdk.ts:142
Returns: SdkSearch
get version(): SdkVersion
Defined in services/dependency/sdk/sdk.ts:151
Returns: SdkVersion
@ibm-wch-sdk/ng > "services/dependency/sdk/sdk" > SdkDependencies
↳ SdkDependencies
● loggerService: LoggerService
Defined in services/dependency/sdk/sdk.ts:19
● msgHandlers: Generator
<SdkMessageHandler
[]>
Defined in services/dependency/sdk/sdk.ts:23
● router: Router
Inherited from SdkRouterDependencies.router
Defined in services/dependency/sdk/router/router.ts:15
● urlsService: UrlConfig
Inherited from SdkJsonpDependencies.urlsService
Defined in services/dependency/sdk/jsonp/jsonp.ts:19
● wchService: WchService
Overrides SdkSearchDependencies.wchService
Defined in services/dependency/sdk/sdk.ts:21
@ibm-wch-sdk/ng > "services/http/http.service" > WchHttpService
WchHttpService
⊕ new WchHttpService(aWchService: WchService): WchHttpService
Defined in services/http/http.service.ts:25
Parameters:
Name | Type |
---|---|
aWchService | WchService |
Returns: WchHttpService
● getJsonResource: function
Defined in services/http/http.service.ts:17
Fetches a JSON resource and keeps this live based on the given or the default options
param: the URL to fetch, this can be a relative URL in which case it applies to the correct base API URL
returns: an observable with the content
▸<T
>(aUrl: string
, aOptions?: HttpResourceOptions
): Observable
<T
>
Type parameters:
Parameters:
Name | Type |
---|---|
aUrl | string |
Optional aOptions | HttpResourceOptions |
Returns: Observable
<T
>
● getTextResource: function
Defined in services/http/http.service.ts:25
Fetches a string resource and keeps this live based on the given or the default options
param: the URL to fetch, this can be a relative URL in which case it applies to the correct base API URL
returns: an observable with the content
▸(aUrl: string
, aOptions?: HttpResourceOptions
): Observable
<string
>
Parameters:
Name | Type |
---|---|
aUrl | string |
Optional aOptions | HttpResourceOptions |
Returns: Observable
<string
>
@ibm-wch-sdk/ng > "services/http/http.service.on.http.client" > HttpServiceOnHttpClient
HttpServiceOnHttpClient
HttpService
⊕ new HttpServiceOnHttpClient(aHttpClient: HttpClient
): HttpServiceOnHttpClient
Defined in services/http/http.service.on.http.client.ts:16
Parameters:
Name | Type |
---|---|
aHttpClient | HttpClient |
Returns: HttpServiceOnHttpClient
● getJson: function
Defined in services/http/http.service.on.http.client.ts:15
▸<T
>(aUrl: string
, aOptions: HttpOptions
): Observable
<T
>
Type parameters:
Parameters:
Name | Type |
---|---|
aUrl | string |
aOptions | HttpOptions |
Returns: Observable
<T
>
● getText: function
Defined in services/http/http.service.on.http.client.ts:16
▸(aUrl: string
, aOptions: HttpOptions
): Observable
<string
>
Parameters:
Name | Type |
---|---|
aUrl | string |
aOptions | HttpOptions |
Returns: Observable
<string
>
@ibm-wch-sdk/ng > "services/dependency/sdk/search/search" > SdkSearch
SdkSearch
WchSdkSearch
⊕ new SdkSearch(aDeps: SdkSearchDependencies): SdkSearch
Defined in services/dependency/sdk/search/search.ts:23
Parameters:
Name | Type |
---|---|
aDeps | SdkSearchDependencies |
Returns: SdkSearch
● getRenderingContextById: function
Defined in services/dependency/sdk/search/search.ts:21
▸(aId: string
, aLevels?: number
): Observable
<RenderingContext
>
Parameters:
Name | Type |
---|---|
aId | string |
Optional aLevels | number |
Returns: Observable
<RenderingContext
>
● getRenderingContexts: function
Defined in services/dependency/sdk/search/search.ts:22
▸(aValue: QueryInput, aLevels?: number
): Observable
<RenderingContextQueryResult
>
Parameters:
Name | Type |
---|---|
aValue | QueryInput |
Optional aLevels | number |
Returns: Observable
<RenderingContextQueryResult
>
● getSitePages: function
Defined in services/dependency/sdk/search/search.ts:23
▸(aValue: QueryInput): Observable
<SitePagesQueryResult
>
Parameters:
Name | Type |
---|---|
aValue | QueryInput |
Returns: Observable
<SitePagesQueryResult
>
@ibm-wch-sdk/ng > "services/dependency/sdk/search/search" > SdkSearchDependencies
SdkSearchDependencies
● wchService: WchService
Defined in services/dependency/sdk/search/search.ts:15
@ibm-wch-sdk/ng > "services/http/http.service.on.jsonp" > HttpServiceOnJsonp
dynamic:
HttpServiceOnJsonp
HttpService
⊕ new HttpServiceOnJsonp(aDocument: Document
, aHttpClient: HttpClient
, aZoneService: ZoneService): HttpServiceOnJsonp
Defined in services/http/http.service.on.jsonp.ts:27
Parameters:
Name | Type |
---|---|
aDocument | Document |
aHttpClient | HttpClient |
aZoneService | ZoneService |
Returns: HttpServiceOnJsonp
● getJson: function
Defined in services/http/http.service.on.jsonp.ts:26
▸<T
>(aUrl: string
, aOptions: HttpOptions
): Observable
<T
>
Type parameters:
Parameters:
Name | Type |
---|---|
aUrl | string |
aOptions | HttpOptions |
Returns: Observable
<T
>
● getText: function
Defined in services/http/http.service.on.jsonp.ts:27
▸(aUrl: string
, aOptions: HttpOptions
): Observable
<string
>
Parameters:
Name | Type |
---|---|
aUrl | string |
aOptions | HttpOptions |
Returns: Observable
<string
>
@ibm-wch-sdk/ng > "services/hub-info/hub-info.service" > HubInfoService
HubInfoService
HubInfoConfig
⊕ new HubInfoService(aApiUrl: HubInfoUrlProvider
, aDeliveryUrl: HubInfoUrlProvider
, aBaseUrl: HubInfoUrlProvider
, aHttpOptions: HttpResourceOptions
, aHttpPreviewOptions: HttpResourceOptions
, aCycleHandlingStrategy: CYCLE_HANDLING
| string
, aFetchLevels: number
): HubInfoService
Defined in services/hub-info/hub-info.service.ts:81
Parameters:
Name | Type |
---|---|
aApiUrl | HubInfoUrlProvider |
aDeliveryUrl | HubInfoUrlProvider |
aBaseUrl | HubInfoUrlProvider |
aHttpOptions | HttpResourceOptions |
aHttpPreviewOptions | HttpResourceOptions |
aCycleHandlingStrategy | CYCLE_HANDLING | string |
aFetchLevels | number |
Returns: HubInfoService
<Optional>
apiUrl● apiUrl: HubInfoUrlProvider
Defined in services/hub-info/hub-info.service.ts:29
URL to access the API layer
Naming of this field according to the field in the rendering context
example: 'https://my.digitalexperience.ibm.com/api/345563cf-a83c-40e5-a065-1d6ff36b05c1'
example: 'https://my.digitalexperience.ibm.com/api/345563cf-a83c-40e5-a065-1d6ff36b05c1/dxsites/mysite'
<Optional>
baseUrl● baseUrl: HubInfoUrlProvider
Defined in services/hub-info/hub-info.service.ts:50
URL that represents the base URL of the path based routing of the application. This prefix will be preserved when generating and recognizing URLs. If this property is not configured, then it will be decoded from the window location.
example: 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1'
example: 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1/dxsites/mysite'
example: 'https://my.external.example.com/'
<Optional>
cycleHandlingStrategy● cycleHandlingStrategy: CYCLE_HANDLING
| string
Defined in services/hub-info/hub-info.service.ts:75
Optionally specify how the SDK is supposed to deal with cyclic references in the content data structure. Per default the rendering context will break cycles by representing the duplicate element in a reference path by an unresolved reference. When configuring the strategy to {@link CYCLE_HANDLING.RESOLVE}, the ContentrefComponent will use a resolved refence when rendering the context, instead of the unresolved reference. This bears the risk of an infinite loop during rendering. The actual rendering context objects will still not have cycles, so a JSON serialization of these objects will produce a valid result.
Default is {@link CYCLE_HANDLING.BREAK}
<Optional>
deliveryUrl● deliveryUrl: HubInfoUrlProvider
Defined in services/hub-info/hub-info.service.ts:39
URL to access the delivery
Naming of this field according to the field in the rendering context
example: 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1'
example: 'https://my.digitalexperience.ibm.com/345563cf-a83c-40e5-a065-1d6ff36b05c1/dxsites/mysite'
<Optional>
fetchLevels● fetchLevels: number
Defined in services/hub-info/hub-info.service.ts:81
Number of levels to fetch per request to the rendering context. If missing all levels will be fetched.
<Optional>
httpOptions● httpOptions: HttpResourceOptions
Defined in services/hub-info/hub-info.service.ts:55
Optionally specify how the SDK makes outbound requests
<Optional>
httpPreviewOptions● httpPreviewOptions: HttpResourceOptions
Defined in services/hub-info/hub-info.service.ts:60
Optionally specify how the SDK makes outbound requests for the preview case
@ibm-wch-sdk/ng > "services/info/wch.info.service" > WchInfoService
WchInfoService
UrlConfig
⊕ new WchInfoService(wchService: WchService): WchInfoService
Defined in services/info/wch.info.service.ts:15
Parameters:
Name | Type |
---|---|
wchService | WchService |
Returns: WchInfoService
● apiUrl: URL
Defined in services/info/wch.info.service.ts:11
some global infos. See definitions in UrlConfig
<Optional>
baseUrl● baseUrl: URL
Defined in services/info/wch.info.service.ts:15
● deliveryUrl: URL
Defined in services/info/wch.info.service.ts:12
● isPreviewMode: boolean
Defined in services/info/wch.info.service.ts:13
@ibm-wch-sdk/ng > "services/logger/wch.logger.service" > WchLoggerService
WchLoggerService
LoggerService
⊕ new WchLoggerService(): WchLoggerService
Defined in services/logger/wch.logger.service.ts:24
Returns: WchLoggerService
● get: function
Defined in services/logger/wch.logger.service.ts:24
▸(name: string
): Logger
Parameters:
Name | Type |
---|---|
name | string |
Returns: Logger
@ibm-wch-sdk/ng > "services/logger/logger.service" > LoggerProxy
Implementation of the logger service. The service accepts either a {@link LoggerFactory} or a {@link DynamicLoggerFactory} as initialization parameters to dynamically replace logger instances.
LoggerProxy
OnDestroy
⊕ new LoggerProxy(aInjector: Injector
): LoggerProxy
Defined in services/logger/logger.service.ts:124
Parameters:
Name | Type |
---|---|
aInjector | Injector |
Returns: LoggerProxy
<Private>
_fctSubscription● _fctSubscription: Subscription
Defined in services/logger/logger.service.ts:124
▸ get(name: string
): Logger
Defined in services/logger/logger.service.ts:151
Parameters:
Name | Type |
---|---|
name | string |
Returns: Logger
▸ ngOnDestroy(): void
Defined in services/logger/logger.service.ts:155
Returns: void
@ibm-wch-sdk/ng > "services/markup/markup.service" > MarkupService
MarkupService
OnDestroy
⊕ new MarkupService(): MarkupService
Defined in services/markup/markup.service.ts:24
Returns: MarkupService
get markupProviders(): MarkupProviders
Defined in services/markup/markup.service.ts:29
Returns: MarkupProviders
▸ ngOnDestroy(): void
Defined in services/markup/markup.service.ts:41
Returns: void
▸ registerProvider(aLayoutType: string
, aProvider: MarkupProvider): void
Defined in services/markup/markup.service.ts:33
Parameters:
Name | Type |
---|---|
aLayoutType | string |
aProvider | MarkupProvider |
Returns: void
@ibm-wch-sdk/ng > "services/markup/markup.service" > MarkupProvider
MarkupProvider
▸ compile(aURL: string
, aTemplateString: string
): Observable
<MarkupGenerator>
Defined in services/markup/markup.service.ts:13
Parameters:
Name | Type |
---|---|
aURL | string |
aTemplateString | string |
Returns: Observable
<MarkupGenerator>
▸ getComponentTypeRef(): ComponentTypeRef
<any
>
Defined in services/markup/markup.service.ts:14
Returns: ComponentTypeRef
<any
>
@ibm-wch-sdk/ng > "services/markup/markup.service" > MarkupProviders
MarkupProviders
[layoutType: string
]: MarkupProvider
@ibm-wch-sdk/ng > "services/mappings/mappings.service" > Mappings
Mappings
● byId: Record
<string
, MappingEntry>
Defined in services/mappings/mappings.service.ts:34
● byKind: Record
<string
, MappingEntry>
Defined in services/mappings/mappings.service.ts:35
@ibm-wch-sdk/ng > "utils/component.mapping.utils" > RegisteredMapping
RegisteredMapping
<Optional>
id● id: string
| string
[]
Defined in utils/component.mapping.utils.ts:32
Type IDs or content IDs to map this to
<Optional>
kind● kind: CONTENT_ITEM_KIND
| CONTENT_ITEM_KIND
[]
Defined in utils/component.mapping.utils.ts:37
Type IDs to map this to
<Optional>
layoutMode● layoutMode: string
| string
[]
Defined in utils/component.mapping.utils.ts:27
● selector: string
| string
[] | Type
<any
>
Defined in utils/component.mapping.utils.ts:22
@ibm-wch-sdk/ng > "services/page/active.page.service" > ActivePageService
ActivePageService
ActivePage
OnDestroy
get onRenderingContext(): Observable
<RenderingContext
>
Defined in services/page/active.page.service.ts:22
Returns: Observable
<RenderingContext
>
▸ ngOnDestroy(): void
Defined in services/page/active.page.service.ts:29
Returns: void
@ibm-wch-sdk/ng > "services/refresh/refresh.service" > RefreshService
RefreshService
⊕ new RefreshService(aWchService: WchService): RefreshService
Defined in services/refresh/refresh.service.ts:18
Parameters:
Name | Type |
---|---|
aWchService | WchService |
Returns: RefreshService
● refresh: function
Defined in services/refresh/refresh.service.ts:18
▸(): void
Returns: void
@ibm-wch-sdk/ng > "services/resolver/content.resolver.service" > ContentResolverService
ContentResolverService
⊕ new ContentResolverService(wchService: WchService): ContentResolverService
Defined in services/resolver/content.resolver.service.ts:14
Parameters:
Name | Type |
---|---|
wchService | WchService |
Returns: ContentResolverService
● resolveRenderingContext: function
Defined in services/resolver/content.resolver.service.ts:13
▸(aRenderingContext?: RenderingContext
, aStrategy?: CYCLE_HANDLING
): Observable
<RenderingContext
| null
| undefined
>
Parameters:
Name | Type |
---|---|
Optional aRenderingContext | RenderingContext |
Optional aStrategy | CYCLE_HANDLING |
Returns: Observable
<RenderingContext
| null
| undefined
>
@ibm-wch-sdk/ng > "services/search/search.service" > SearchService
SearchService
WchSdkSearch
⊕ new SearchService(wchService: WchService): SearchService
Defined in services/search/search.service.ts:25
Parameters:
Name | Type |
---|---|
wchService | WchService |
Returns: SearchService
● getRenderingContextById: function
Defined in services/search/search.service.ts:17
▸(aId: string
, aLevels?: number
): Observable
<RenderingContext
>
Parameters:
Name | Type |
---|---|
aId | string |
Optional aLevels | number |
Returns: Observable
<RenderingContext
>
● getRenderingContexts: function
Defined in services/search/search.service.ts:21
▸(aValue: QueryInput, aLevels?: number
): Observable
<RenderingContextQueryResult
>
Parameters:
Name | Type |
---|---|
aValue | QueryInput |
Optional aLevels | number |
Returns: Observable
<RenderingContextQueryResult
>
● getSitePages: function
Defined in services/search/search.service.ts:25
▸(aValue: QueryInput): Observable
<SitePagesQueryResult
>
Parameters:
Name | Type |
---|---|
aValue | QueryInput |
Returns: Observable
<SitePagesQueryResult
>
@ibm-wch-sdk/ng > "services/storage/storage.service" > StorageService
ClientStorageService
↳ StorageService
ClientStorage
ClientStorage
⊕ new StorageService(aUrlsService: UrlsService): StorageService
Overrides ClientStorageService.__constructor
Defined in services/storage/storage.service.ts:10
Parameters:
Name | Type |
---|---|
aUrlsService | UrlsService |
Returns: StorageService
● get: function
Inherited from ClientStorageService.get
Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/storage/storage.service.d.ts:5
▸(aKey: string
): AnyJson
Parameters:
Name | Type |
---|---|
aKey | string |
Returns: AnyJson
● put: function
Inherited from ClientStorageService.put
Defined in /usr/build/node_modules/@ibm-wch-sdk/utils/src/storage/storage.service.d.ts:6
▸(aKey: string
, aValue: AnyJson
): void
Parameters:
Name | Type |
---|---|
aKey | string |
aValue | AnyJson |
Returns: void
@ibm-wch-sdk/ng > "services/url/urls.service" > UrlsService
Implementation of a service that decodes the relevant URLs
dynamic:
UrlsService
UrlConfig
⊕ new UrlsService(aBaseUrl: HubInfoUrlProvider
, aApiUrl: HubInfoUrlProvider
, aDeliveryUrl: HubInfoUrlProvider
, aDocument: Document
): UrlsService
Defined in services/url/urls.service.ts:56
Parameters:
Name | Type |
---|---|
aBaseUrl | HubInfoUrlProvider |
aApiUrl | HubInfoUrlProvider |
aDeliveryUrl | HubInfoUrlProvider |
aDocument | Document |
Returns: UrlsService
● apiUrl: URL
Defined in services/url/urls.service.ts:37
The API URL to content hub
<Optional>
baseUrl● baseUrl: URL
Defined in services/url/urls.service.ts:48
The base URL of the host the application is running on. This can be undefined if the application is rendered standalone as part of the universal renderer.
● deliveryUrl: URL
Defined in services/url/urls.service.ts:42
The Delivery URL to content hub
● isPreviewMode: boolean
Defined in services/url/urls.service.ts:56
True if the system runs in preview mode, else false.
<Optional>
resourceUrl● resourceUrl: URL
Defined in services/url/urls.service.ts:53
The base URL of the document, this is the URL that is used as the basis for static resources in the application
@ibm-wch-sdk/ng > "services/wch.service" > WchService
WchService
OnDestroy
⊕ new WchService(aHttp: HttpService
, aJsonp: HttpService
, wchConfig: HubInfoService, aUrlService: UrlsService, clientStorage: StorageService, bootstrapService: BootstrapService, markupProviderService: MarkupService, zoneService: ZoneService, loggerService: WchLoggerService, aInjector: Injector
): WchService
Defined in services/wch.service.ts:234
Parameters:
Name | Type |
---|---|
aHttp | HttpService |
aJsonp | HttpService |
wchConfig | HubInfoService |
aUrlService | UrlsService |
clientStorage | StorageService |
bootstrapService | BootstrapService |
markupProviderService | MarkupService |
zoneService | ZoneService |
loggerService | WchLoggerService |
aInjector | Injector |
Returns: WchService
<Protected>
createPollingTrigger● createPollingTrigger: function
Defined in services/wch.service.ts:232
▸(aOptions?: HttpResourceOptions
): Observable
<any
>
Parameters:
Name | Type |
---|---|
Optional aOptions | HttpResourceOptions |
Returns: Observable
<any
>
● getApiUrl: function
Defined in services/wch.service.ts:183
▸(): URL
Returns: URL
● getAppConfig: function
Defined in services/wch.service.ts:188
▸(): Observable
<ApplicationConfig>
Returns: Observable
<ApplicationConfig>
● getBaseUrl: function
Defined in services/wch.service.ts:185
▸(): URL
| undefined
Returns: URL
| undefined
● getCorsWhitelist: function
Defined in services/wch.service.ts:217
▸(): Observable
<string
[]>
Returns: Observable
<string
[]>
● getDeliverOrigin: function
Defined in services/wch.service.ts:187
▸(): string
Returns: string
● getDeliveryUrl: function
Defined in services/wch.service.ts:184
▸(): URL
Returns: URL
● getJsonResource: function
Defined in services/wch.service.ts:218
▸<T
>(aUrl: string
, aOptions?: HttpResourceOptions
): Observable
<T
>
Type parameters:
Parameters:
Name | Type |
---|---|
aUrl | string |
Optional aOptions | HttpResourceOptions |
Returns: Observable
<T
>
● getRenderingContextByActivatedRoute: function
Defined in services/wch.service.ts:205
▸(aRoute: ActivatedRoute
, aLevels?: number
): Observable
<RenderingContext
| null
| undefined
>
Parameters:
Name | Type |
---|---|
aRoute | ActivatedRoute |
Optional aLevels | number |
Returns: Observable
<RenderingContext
| null
| undefined
>
● getRenderingContextById: function
Defined in services/wch.service.ts:189
▸(aID: string
| null
| undefined
, aLevels?: number
): Observable
<RenderingContext
| null
| undefined
>
Parameters:
Name | Type |
---|---|
aID | string | null | undefined |
Optional aLevels | number |
Returns: Observable
<RenderingContext
| null
| undefined
>
● getRenderingContextByPage: function
Defined in services/wch.service.ts:201
▸(aPage: SitePage
, aLevels?: number
): Observable
<RenderingContext
| null
| undefined
>
Parameters:
Name | Type |
---|---|
aPage | SitePage |
Optional aLevels | number |
Returns: Observable
<RenderingContext
| null
| undefined
>
● getRenderingContextByPath: function
Defined in services/wch.service.ts:197
▸(aPath: string
, aLevels?: number
): Observable
<RenderingContext
| null
| undefined
>
Parameters:
Name | Type |
---|---|
aPath | string |
Optional aLevels | number |
Returns: Observable
<RenderingContext
| null
| undefined
>
● getRenderingContextByUrlSegments: function
Defined in services/wch.service.ts:193
▸(aSegments: UrlSegment
[], aLevels?: number
): Observable
<RenderingContext
| null
| undefined
>
Parameters:
Name | Type |
---|---|
aSegments | UrlSegment [] |
Optional aLevels | number |
Returns: Observable
<RenderingContext
| null
| undefined
>
● getRenderingContextForAppConfig: function
Defined in services/wch.service.ts:209
▸(aLevels?: number
): Observable
<RenderingContext
>
Parameters:
Name | Type |
---|---|
Optional aLevels | number |
Returns: Observable
<RenderingContext
>
● getRenderingContextsByQuery: function
Defined in services/wch.service.ts:212
▸(aQuery: string
, aLevels?: number
): Observable
<RenderingContextQueryResult
>
Parameters:
Name | Type |
---|---|
aQuery | string |
Optional aLevels | number |
Returns: Observable
<RenderingContextQueryResult
>
● getSitePagesByQuery: function
Defined in services/wch.service.ts:216
▸(aQuery: string
): Observable
<SitePagesQueryResult
>
Parameters:
Name | Type |
---|---|
aQuery | string |
Returns: Observable
<SitePagesQueryResult
>
● getTextResource: function
Defined in services/wch.service.ts:222
▸(aUrl: string
, aOptions?: HttpResourceOptions
): Observable
<string
>
Parameters:
Name | Type |
---|---|
aUrl | string |
Optional aOptions | HttpResourceOptions |
Returns: Observable
<string
>
● isPreviewMode: function
Defined in services/wch.service.ts:186
▸(): boolean
Returns: boolean
● ngOnDestroy: function
Defined in services/wch.service.ts:179
▸(): void
Returns: void
● resolveRenderingContext: function
Defined in services/wch.service.ts:226
▸(aRenderingContext?: RenderingContext
, aStrategy?: CYCLE_HANDLING
): Observable
<RenderingContext
| null
| undefined
>
Parameters:
Name | Type |
---|---|
Optional aRenderingContext | RenderingContext |
Optional aStrategy | CYCLE_HANDLING |
Returns: Observable
<RenderingContext
| null
| undefined
>
● triggerRefresh: function
Defined in services/wch.service.ts:182
▸(): void
Returns: void
@ibm-wch-sdk/ng > "services/zone/zone.service" > ZoneService
Service that exposes schedulers and operators that allow client code to run inside or outside of angular zone.
ZoneService
⊕ new ZoneService(aZone: NgZone
): ZoneService
Defined in services/zone/zone.service.ts:29
Parameters:
Name | Type |
---|---|
aZone | NgZone |
Returns: ZoneService
● insideScheduler: SchedulerLike
Defined in services/zone/zone.service.ts:16
● observeInside: function
Defined in services/zone/zone.service.ts:24
Operator to run the observer inside of a zone
▸<T
>(): MonoTypeOperatorFunction
<T
>
Type parameters:
Returns: MonoTypeOperatorFunction
<T
>
● outsideScheduler: SchedulerLike
Defined in services/zone/zone.service.ts:19
● subscribeOutside: function
Defined in services/zone/zone.service.ts:29
Operator to subscribe outside of a zone
▸<T
>(): MonoTypeOperatorFunction
<T
>
Type parameters:
Returns: MonoTypeOperatorFunction
<T
>
@ibm-wch-sdk/ng > "utils/component.utils" > RegisteredComponent
RegisteredComponent
● directive: LayoutComponentDirective
Defined in utils/component.utils.ts:76
● type: Type
<any
>
Defined in utils/component.utils.ts:77
@ibm-wch-sdk/ng > "utils/http.service.on.jsonp" > PendingRequests
PendingRequests
[url: string
]: Observable
<any
>
@ibm-wch-sdk/ng > "utils/markup.utils" > Markup
Markup
● componentId: string
Defined in utils/markup.utils.ts:15
● layoutMode: string
Defined in utils/markup.utils.ts:16
● markup: string
| undefined
Defined in utils/markup.utils.ts:18
● template: MarkupGenerator | undefined
Defined in utils/markup.utils.ts:19
● templateRef: string
Defined in utils/markup.utils.ts:17
@ibm-wch-sdk/ng > "utils/markup.utils" > MarkupMapping
MarkupMapping
● byId: object
Defined in utils/markup.utils.ts:29
● byTemplate: object
Defined in utils/markup.utils.ts:28
@ibm-wch-sdk/ng > "utils/markup.utils" > MarkupRef
MarkupRef
● markupRef: Markup
Defined in utils/markup.utils.ts:24
● provider: MarkupProvider
Defined in utils/markup.utils.ts:23
@ibm-wch-sdk/ng > "utils/rx.utils" > AbstractNgInZoneScheduler
Implements a scheduler that runs the work inside or outside an angular zone.
AbstractNgInZoneScheduler
SchedulerLike
⊕ new AbstractNgInZoneScheduler(aZone: NgZone
, aDelegate?: SchedulerLike
): AbstractNgInZoneScheduler
Defined in utils/rx.utils.ts:36
Parameters:
Name | Type |
---|---|
aZone | NgZone |
Optional aDelegate | SchedulerLike |
Returns: AbstractNgInZoneScheduler
<Private>
delegate● delegate: SchedulerLike
Defined in utils/rx.utils.ts:34
<Private>
zone● zone: NgZone
Defined in utils/rx.utils.ts:36
<Protected>``<Abstract>
doRun▸ doRun(zone: NgZone
, cb: function
): Subscription
Defined in utils/rx.utils.ts:55
Parameters:
Name | Type |
---|---|
zone | NgZone |
cb | function |
Returns: Subscription
▸ now(): number
Defined in utils/rx.utils.ts:44
Returns: number
▸ schedule<T
>(work: function
, delay?: number
, state?: T
): Subscription
Defined in utils/rx.utils.ts:48
Type parameters:
Parameters:
Name | Type |
---|---|
work | function |
Optional delay | number |
Optional state | T |
Returns: Subscription
@ibm-wch-sdk/ng > "utils/rx.utils" > NgInZoneScheduler
↳ NgInZoneScheduler
SchedulerLike
⊕ new NgInZoneScheduler(aZone: NgZone
, aDelegate?: SchedulerLike
): NgInZoneScheduler
Overrides AbstractNgInZoneScheduler.constructor
Defined in utils/rx.utils.ts:59
Parameters:
Name | Type |
---|---|
aZone | NgZone |
Optional aDelegate | SchedulerLike |
Returns: NgInZoneScheduler
<Protected>
doRun▸ doRun(zone: NgZone
, cb: function
): Subscription
Overrides AbstractNgInZoneScheduler.doRun
Defined in utils/rx.utils.ts:65
Parameters:
Name | Type |
---|---|
zone | NgZone |
cb | function |
Returns: Subscription
▸ now(): number
Inherited from AbstractNgInZoneScheduler.now
Defined in utils/rx.utils.ts:44
Returns: number
▸ schedule<T
>(work: function
, delay?: number
, state?: T
): Subscription
Inherited from AbstractNgInZoneScheduler.schedule
Defined in utils/rx.utils.ts:48
Type parameters:
Parameters:
Name | Type |
---|---|
work | function |
Optional delay | number |
Optional state | T |
Returns: Subscription
@ibm-wch-sdk/ng > "utils/rx.utils" > NgOutOfZoneScheduler
↳ NgOutOfZoneScheduler
SchedulerLike
⊕ new NgOutOfZoneScheduler(aZone: NgZone
, aDelegate?: SchedulerLike
): NgOutOfZoneScheduler
Overrides AbstractNgInZoneScheduler.constructor
Defined in utils/rx.utils.ts:70
Parameters:
Name | Type |
---|---|
aZone | NgZone |
Optional aDelegate | SchedulerLike |
Returns: NgOutOfZoneScheduler
<Protected>
doRun▸ doRun(zone: NgZone
, cb: function
): Subscription
Overrides AbstractNgInZoneScheduler.doRun
Defined in utils/rx.utils.ts:76
Parameters:
Name | Type |
---|---|
zone | NgZone |
cb | function |
Returns: Subscription
▸ now(): number
Inherited from AbstractNgInZoneScheduler.now
Defined in utils/rx.utils.ts:44
Returns: number
▸ schedule<T
>(work: function
, delay?: number
, state?: T
): Subscription
Inherited from AbstractNgInZoneScheduler.schedule
Defined in utils/rx.utils.ts:48
Type parameters:
Parameters:
Name | Type |
---|---|
work | function |
Optional delay | number |
Optional state | T |
Returns: Subscription
@ibm-wch-sdk/ng > "utils/rx.utils" > ZoneSchedulers
ZoneSchedulers
● inside: SchedulerLike
Defined in utils/rx.utils.ts:82
● outside: SchedulerLike
Defined in utils/rx.utils.ts:83
The SDK exposes the following services:
@ibm-wch-sdk/ng > "services/config/application.config" > ApplicationConfig
ContentItem
↳ ApplicationConfig
● classification: string
Overrides BaseDeliveryItem.classification
Defined in services/config/application.config.ts:7
<Optional>
created● created: string
Inherited from BaseDeliveryItem.created
Defined in /usr/build/node_modules/@ibm-wch-sdk/api/interfaces/delivery/v1/base.item.d.ts:19
<Optional>
creatorId● creatorId: string
Inherited from BaseDeliveryItem.creatorId
Defined in /usr/build/node_modules/@ibm-wch-sdk/api/interfaces/delivery/v1/base.item.d.ts:20
<Optional>
description● description: string
Inherited from BaseDeliveryItem.description
Defined in /usr/build/node_modules/@ibm-wch-sdk/api/interfaces/delivery/v1/base.item.d.ts:21
<Optional>
draftId● draftId: string
Inherited from ContentItem.draftId
Defined in /usr/build/node_modules/@ibm-wch-sdk/api/interfaces/delivery/v1/content/content.item.d.ts:12
TBD
<Optional>
draftStatus● draftStatus: "pending" | "approved"
Inherited from ContentItem.draftStatus
Defined in /usr/build/node_modules/@ibm-wch-sdk/api/interfaces/delivery/v1/content/content.item.d.ts:16
TBD
● elements: object
Overrides ContentItem.elements
Defined in services/config/application.config.ts:11
● id: string
Overrides BaseDeliveryItem.id
Defined in services/config/application.config.ts:5
● kind: CONTENT_ITEM_KIND
[]
Inherited from ContentItem.kind
Defined in /usr/build/node_modules/@ibm-wch-sdk/api/interfaces/delivery/v1/content/content.item.d.ts:8
Kind of a content item
<Optional>
lastModified● lastModified: string
Inherited from BaseDeliveryItem.lastModified
Defined in /usr/build/node_modules/@ibm-wch-sdk/api/interfaces/delivery/v1/base.item.d.ts:17
<Optional>
lastModifierId● lastModifierId: string
Inherited from BaseDeliveryItem.lastModifierId
Defined in /usr/build/node_modules/@ibm-wch-sdk/api/interfaces/delivery/v1/base.item.d.ts:18
<Optional>
locale● locale: string
Inherited from ContentItem.locale
Defined in /usr/build/node_modules/@ibm-wch-sdk/api/interfaces/delivery/v1/content/content.item.d.ts:18
● name: string
Overrides BaseDeliveryItem.name
Defined in services/config/application.config.ts:6
<Optional>
rev● rev: string
Inherited from BaseDeliveryItem.rev
Defined in /usr/build/node_modules/@ibm-wch-sdk/api/interfaces/delivery/v1/base.item.d.ts:14
<Optional>
tags● tags: Array
<string
>
Inherited from ContentItem.tags
Defined in /usr/build/node_modules/@ibm-wch-sdk/api/interfaces/delivery/v1/content/content.item.d.ts:19
● type: string
Overrides ContentItem.type
Defined in services/config/application.config.ts:8
● typeId: string
Overrides ContentItem.typeId
Defined in services/config/application.config.ts:9
This service allows to register data records that are compiled into the application. These records are used to bootstrap the application loading. Whenever a rendering context or the site is requested from WCH, data registered with this service will be used as a placeholder, first (if available). As soon as the real data becomes available, the new data replace the placeholder.
Consider also the the inline form of the @RenderingContextBootstrap or @SiteBootstrap instead.
put(key, value)
: adds a data record, the key is the path used to fetch the data, the value the data record as string or JSONThis service allow to register layout mappings. Consider to use the inline form of the @LayoutComponent instead.
registerMapping(id, sel, mode?)
: registers a new layout mapping. The id
is a content node ID, content type ID or content type name. The sel
selector is either the name of the layout or the type object. In case the type object is given, the mapping will be registered with the selector attached to the type. The mode identifies the layout mode to register the mapping for. If missing the default mode will be assumed.When the ContentRefComponent tries to locale an Angular component for a RenderingContext it will use the layouts
field in the context. If this field is missing or if the specified layout cannot be located, it consults the LayoutMappingService to find a default mapping for the context. This allows the application developer to define application level fallbacks for these mappings, that can however be overridden by the business user.
The service provides access to global, unmodifiable configuration data when accessing the WCH backend.
The URL information is obtained as follows:
apiUrl
or a deliveryUrl
, this configuration is used as a baseline.If both the apiUrl
and the deliveryUrl
variables are defined on the HubInfoService, the configured values are used. If only one is configured, the other is derived from the configured setting.
If the apiUrl
and the deliveryUrl
are decoded from the baseUrl, then the baseUrl
is parsed to decide if it represents a URL with a tenant identifier or a custom hostname. The URLs are then built depending on the result.
apiUrl
: the URL object representing the API entry point. The URL ends with a trailing slash.deliveryUrl
: the URL object representing the delivery entry point. The URL ends with a trailing slash.isPreviewMode
: true if the application runs in preview mode, else false.baseUrl
: optionally the base URL of the document that served the application. This can be undefined in case the application is rendered by Angular Universal.WchInfoService
represents the configuration data after all fallbacks have been applied, this is the data actually used by other SDK services. The HubInfoService however represents input data from the application, this data can be incomplete and would be filled in with defaults.localhost
. In local development mode make sure to define the apiUrl
and/or the deliveryUrl
to point to your WCH instance.The service provides access to the RenderingContext of the currently selected page.
onRenderingContext
: an observable of the context of the selected page. If no page is selected, the context will be null
, so make sure to protect access to members.
The SDK implements the plain JS WCH SDK APIs based on the Angular framwork.
refresh()
: causes the currently displayed data to be refreshedThe SDK is available on the global window object
window.WchSdk
The search service allows to perform searches against the WCH index for rendering contexts or pages. The search results are kept current, automatically, based on the configured refresh interval.
getRenderingContexts(query, levels?)
: an observable of rendering contexts. The query must be a query against content items and will be resolved by the rendering contexts for these content items. The query will automatically be limited to content items and will ignore any field list options.getSitePages(query)
: an observable of site pages. The query must be a query against pages and will be resolved by an array of page instances. The query will automatically be limited to pages and will ignore any field list options. The resulting pages will automatically only contain pages for the current site.getRenderingContexts
can be rendered using the wch-contentref component.getSitePages
can be rendered using the wch-pageref component.The refresh service allows to trigger a refresh of all data records that are managed by the SDK and that are based on REST request against the SDK, e.g. the rendering context, site structure or search results. Call this service to force an update after server side information has changed.
refresh()
: Triggers the refresh call.Angular leverages the power of Reactive Streams across its APIs and applying this pattern for custom applications will make them faster and easier to maintain. In this chapter we discuss how to combine Reactive Streams with the ibm-wch-sdk-ng
.
This section discusses aspects that are relevant for building your application.
When writing single page applications using the @ibm-wch-sdk/ng
they are typically hosted on WCH. In this case the SDK can automatically detect the correct API URL from the URL the application has been served from.
In case the application is hosted on a custom web server, this is not possible, automatically, and the correct API URL has to be configured by the application. In this section we discuss the required configuration steps:
The API URL is configured in the config object passed to WchNgModule.forRoot(config)
in your application root module. Typically the config object is the CLI environment object.
For externally hosted applications the API URL is different for the live mode and the preview mode of the application. It is in the responsivility of the single page application to tell what mode it is running in. Typically this is determined based on the hostname.
We recommend the following way to configure the API URL (see also documentation for @ibm-wch-sdk/utils:
environment.ts
import { HubInfoUrlProvider } from '@ibm-wch-sdk/api';
import { wchGetHubInfoUrlProvider } from '@ibm-wch-sdk/utils';
export function apiUrl(): HubInfoUrlProvider {
return wchGetHubInfoUrlProvider(
'https://my10.digitalexperience.ibm.com/api/6f0ce0ff-8a25-4fac-b66a-5d42516247eb',
baseURL => /preview/.test(baseURL.href)
);
}
export const environment = {
apiUrl
};
function
that returns the configuration provider. This provider computes the correct API based on the baseURL
of the application and the live version of the API URL. A customer provided callback tells based on the baseURL
if the application is running in live mode or in preview mode. The correct API URL will then be computed by the wchGetHubInfoUrlProvider
method.https://<PREFIX>-preview.<SUFFIX>
for the preview domain.apiUrl
in the config object. Do NOT configure the deliveryUrl
option, this will be computed based on the apiUrl
automatically.If your application is derived from Oslo then the live version of the API URL is configured in the /src/aps/Constants.ts
class. Use this value in the example above, e.g. such as:
/src/app/environment/environment.ts
:
import { HubInfoUrlProvider } from '@ibm-wch-sdk/api';
import { wchGetHubInfoUrlProvider } from '@ibm-wch-sdk/utils';
import { Constants } from '../Constants';
export function apiUrl(): HubInfoUrlProvider {
return wchGetHubInfoUrlProvider(Constants.apiUrl, baseURL =>
/preview/.test(baseURL.href)
);
}
export const environment = {
apiUrl
};
WchInfoService
to access the configured API URL in the implementation code of the application. Do NOT access the Constants.apiUrl
anywhere other than in the previously mentioned configuration section.The hostname of you externally hosted application has to be configured as part of the WCH Site.
externalURL
and externalPreviewURL
. These values are required to be https, in order to prevent loading insecure content. Both URLs should be the full URL to where the preview site is hosted (e.g https://my-external-site.com/
or https://my-external-site.com/example-path/
).Refer to the documentation of the UrlsService to learn more about URLs in the WCH SDK.
In this usecase we explore a setup in which you browse your application on your custom domain (which does not have to be managed by WCH) but you would like to host the application binaries and the content on WCH. This e.g. makes sense if you already own a domain that you would like to reuse but you'd like to benefit from the CDN capabilities of WCH to speed up delivery.
Let's assume for a sample setup a custom domain https://my.custom.domain.com
and a WCH tenant with the delivery URL http://myX.digitalexperience.ibm.com/TENANTID/
.
You would like to deploy your application with a context root, since it needs to run alongside other applications that you might have deployed already, so let the base URL of the application be https://my.custom.domain.com/my-app/
.
Following this nomenclature this leads to the following URL configuration:
Do not configure any URL in the /src/app/app.module.ts
.
Configure the ${baseUrl}
and the ${apiUrl}?
in your kicker file /src/index.html
:
<!doctype html>
<html lang="en">
<head>
<!-- used to load static resources -->
<base href="http://myX.digitalexperience.ibm.com/TENANTID/">
<!-- used to make API calls -->
<link rel="wch-config-api-url" href="http://myX.digitalexperience.ibm.com/api/TENANTID/">
<!-- basis for routing -->
<link rel="wch-config-base-url" href="https://my.custom.domain.com/my-app/">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<app-root></app-root>
<script type="text/javascript" src="main.js">
</body>
</html>
https://my.custom.domain.com/my-app/
.https://my.custom.domain.com/my-app/index.html
. In case your server is an Apache server, add the following .htaccess
file to your application root folder:/my-app/.htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(.*) index.html [NC,L]
The page component provides the rendering context for the default configuration content item for the site. You can use this e.g. to render a site navigation.
The component does not require any specific configuration, it attaches itself to the site configuration
Usage in HTML:
<wch-site></wch-site>
layoutMode
: optionally pass the layout mode to be used when rendering the page. If not specified, the system uses the default mode.onRenderingContext
: the rendering context for the page as soon as it has been loadedonLayoutMode
: the layout mode used to render this page.If the site cannot be decoded, the system will look for a component mapped to the PAGE_NOT_FOUND_LAYOUT layout and instantiates this with an empty rendering context.
The site component uses the default site confiuration content item to construct its rendering context.
The page ref component renders the content item referenced by a page. The extended context for the rendering context used to render the item contains the given page and the context for the page (siblings, breadcrumb etc). So this component renders the content item in the context of the given page.
Usage in HTML:
<wch-pageref [sitePage]="..."></wch-pageref>
sitePage
: the page object for the page to be rendered. This can e.g. be determined via a search.layoutMode
: the layout mode used to render the component. If not specified the system uses a default.levels
: the number of levels to resolve nested rendering contexts. Defaults to -1
which means to resolve all levels.onRenderingContext
: fired when the rendering context has changedonComponent
: the actual angular component instance that gets createdonComponentOutput
: a proxied output event sent by the dynamically created component. This event will be wrapped into a ComponentOutput interface.This component is closely related to wch-contentref.
The content component acts as a proxy component and renders that component that is referenced by the id
element that identifies the component by its ID.
Usage in HTML:
<wch-content [id]="..." (onRenderingContext)="..."></wch-content>
id
: the UUID of the selected componentlayoutMode
: the layout mode used to render the component. If not specified the system uses a default.onRenderingContext
: fired when the rendering context has changedonComponent
: the actual angular component instance that gets createdonComponentOutput
: a proxied output event sent by the dynamically created component. This event will be wrapped into a ComponentOutput interface.This component is closely related to wch-contentref.
The content query component is meant to render components that are referenced as the result of a WCH search query.
Usage in HTML:
<!-- assign the instance a local name, so we can reference its properties inside the content projection -->
<wch-contentquery [query]='...' #q>
<!-- use the local name to access the list -->
<wch-contentref *ngFor="let rc of q.onRenderingContexts | async" [renderingContext]="rc"></wch-contentref>
</wch-contentquery>
query
: the search query. This is the query string part as passed to the search REST service, e.g. fq=type:("habitat%5C-voyeur%5C-profile%5C-page")&rows=50&start=0
. The component requires that the search returns only documents classified as components and and that it includes the document as a JSON object. The relevant query parameters will be added automatically to the provided query and will potentially override existing parameters. Also if the q
parameters is missing, it will be filled in with *:*
automatically. Recommendation: do not include a fl
parameter nor a fq
parameters that filters on classification. The attribute can be a string (in which case it has to be a correctly escaped query string), a plain JSON object with string keys and string
or string[]
as values or an implementation of URLSearchParams.onRenderingContexts
: an observable of the RenderingContext array for the search resultsThe component relies on content projection to render the result of the query. Assign a local identifier to the wch-contentquery
component and access the async query result inside the content (e.g. via a ngFor
loop).
The query attribute must be a correctly escaped query string if the string version is used. Each parameter in that query has to be escaped according to Solr Query Syntax rules. Since this can be relatively tedious, developers might want to use a library such as lucene-query-string-builder to build the lucene query strings. The following example illustrates this. Note that the sample constructs a query POJO object to have the SDK to the proper URL escaping. The values of the POJO only have to be escaped in Solr Query Syntax.
import { Query } from 'ibm-wch-sdk-ng';
import * as lucene from 'lucene-query-string-builder';
export class TypeCarouselComponent extends AbstractCarouselComponent {
// contains the correctly escaped query object based on a tags field
onQuery: Observable<Query>;
constructor() {
// builds the lucene query for tags
const queryBuilder: (string) => string = lucene.builder((tagString: string) => {
// shortcut
const _ = lucene;
// split and map
return _.group(_.and(
_.field('type', _.term('Story')),
_.field('tags', _.group(_.or(...tagString.split(',').map(s => s.trim()).map(_.term))))
));
});
// construct the query string object
this.onQuery = this.onQueryTags.filter(Boolean)
.map(queryBuilder)
.map(q => ({
'q': q,
'sort': 'lastModified desc'
}));
}
}
In the HTML template then use:
<wch-contentquery [query]="onQuery | async" #q>
...
</wch-contentquery>
The content component acts as a proxy component and renders that component that is referenced by its route (the URL path).
Usage in HTML:
<wch-contentpath [path]="..." (onRenderingContext)="..."></wch-contentpath>
path
: the (escaped) path to the componentlayoutMode
: the layout mode used to render the component. If not specified the system uses a default.onRenderingContext
: fired when the rendering context has changedonComponent
: the actual angular component instance that gets createdonComponentOutput
: a proxied output event sent by the dynamically created component. This event will be wrapped into a ComponentOutput interface.This component is closely related to wch-contentref.
Default component that is displayed if the layout could not be resolved. The component shows per design empty content. @ibm-wch-sdk/ng > "services/bootstrap/bootstrap.service" > BootstrapService
BootstrapService
OnDestroy
⊕ new BootstrapService(): BootstrapService
Defined in services/bootstrap/bootstrap.service.ts:18
Returns: BootstrapService
▸ get(aKey: string
): Observable
<AnyJson
>
Defined in services/bootstrap/bootstrap.service.ts:27
Parameters:
Name | Type |
---|---|
aKey | string |
Returns: Observable
<AnyJson
>
▸ ngOnDestroy(): void
Defined in services/bootstrap/bootstrap.service.ts:44
Returns: void
▸ put(aKey: string
, aValue: AnyJson
| string
| ObservableInput
<AnyJson
> | Generator
<AnyJson
>): void
Defined in services/bootstrap/bootstrap.service.ts:32
Parameters:
Name | Type |
---|---|
aKey | string |
aValue | AnyJson | string | ObservableInput <AnyJson > | Generator <AnyJson > |
Returns: void
▸ putContentWithLayout(aContext: ContentItemWithLayout
| string
): void
Defined in services/bootstrap/bootstrap.service.ts:36
Parameters:
Name | Type |
---|---|
aContext | ContentItemWithLayout | string |
Returns: void
▸ putSite(aSite: Site
| string
): void
Defined in services/bootstrap/bootstrap.service.ts:40
Parameters:
Name | Type |
---|---|
aSite | Site | string |
Returns: void
@ibm-wch-sdk/ng > "services/components/components.service" > ByLayoutModeMapping
ByLayoutModeMapping
[layoutMode: string
]: BySelectorMapping
@ibm-wch-sdk/ng > "services/components/components.service" > BySelectorMapping
BySelectorMapping
[selector: string
]: MappingEntry
@ibm-wch-sdk/ng > "services/components/components.service" > MappingEntry
MappingEntry
● ob: Observable
<ComponentTypeRef
<any
>>
Defined in services/components/components.service.ts:35
● sub: Subject
<ComponentTypeRef
<any
>>
Defined in services/components/components.service.ts:34
The purpose of the bootstrap directives is to conveniently register initialization data objects with the BootstrapService.
This directive declares a static property of type RenderingContext as a bootrapped data set and registers it with the BootstrapService. The registration will automatically take the id
into account.
class MyDataSet {
@RenderingContextBootstrap()
static myContent: RenderingContext = {...};
}
This directive declares a static property of type Site as a bootrapped data set and registers it with the BootstrapService. The registration will automatically take the id
into account.
class MyDataSet {
@SiteBootstrap()
static mySite: Site = {...};
}
Alternatively you can import the Site directly from a JSON file, the default Angular CLI build process is able to integrate this into the final bundle. This approach is more convenient, since it keeps data and code separate at development time. The JSON file can also be generated as part of a build step via the create site
command from the ibm-wch-sdk-cli.
typings.d.ts
file, e.g. like this:declare module "*/site.json" {
const value: any;
export default value;
}
AppModule
and declare the bootstrap:import { Site, SiteBootstrap } from 'ibm-wch-sdk-ng';
import * as DEFAULT_SITE from './../assets/delivery/v1/rendering/sites/site.json';
...
export class AppModule {
@SiteBootstrap({siteId: 'default'})
static mySite = DEFAULT_SITE;
}
The SDK router allows to navigate to WCH pages or components.
navigateByPath(path: string): PromiseLike<boolean>
: navigates to a WCH component given its path. The path can be read from the site information in the RenderingContext. The return value indicates when this navigation has completed.activeRoute(): Observable<SitePage>
: returns the active route in form of a page referenceactiveRenderingContext(): Observable<RenderingContext>
: returns the active rendering context
Support layer for making JSONP calls. This service provides means to register callback functions.
addCallback(url: string, cb: Function): string
: registers a callback function to handle the JSONP data callback for the given URL. The method will not send any request, but will only register the callback. The resulting value is the name of the callback. Make sure to unregister the callback after it is no longer used.removeCallback(aName: string): boolean
: unregisters a previously registered callback. Pass in the value returned by the addCallback
method.
In a layout component your HTML template will need to access aspects of the RenderingContext and probably also data derived from the context.
Single page applications running on WCH conceptually need to distinguish the following URLs:
apiUrl
: the base URL used to make requests against the WCH REST service. Use this URL as a prefix for all routes defined in the API documentation.deliveryUrl
: the base URL used to load generic static resources (e.g. images, CSS or config files) from WCH.baseUrl
: the URL prefix for all page URLs, i.e. this prefix is preserved when generating and recognizing URLs. The route
property of a page is a suffix of this URL.resourceUrl
: the base URL used to load the application binaries.In the following section we show how and where these URLs are used. Note all base URLs end with a trailing slash by convention, to allow the use of relative URLs.
The index file (aka kicker
file) is an HTML file that provides the bootstrap markup for an application and that loads the required javascript and styles files. Its generic structure is as follows:
<!doctype html>
<html lang="en">
<head>
<base href="${resourceUrl}">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<app-root></app-root>
<script type="text/javascript" src="main.js">
</body>
</html>
The file defines the base URL it uses to load its resources via the <base>
tag. This URL is conceptually the resourceUrl
. The references to the script and CSS files are then loaded via relative references.
The index file itself is loaded implicitly by the WCH router via the baseUrl
, i.e. all URLs of the following form will result in loading the index.html
file:
${baseUrl}(segment/)*
Individual pages in the SPA are addressed via URLs of the following format:
${baseUrl}(segment/)*
where the suffix to the ${baseUrl}
is the (relative) route
to the pages. The route
can be controlled by the business user when creating and managing pages.
The ${apiUrl}
is used to make REST calls to WCH services. In many cases such calls are made by the WCH SDK implicitly or via APIs exposed by the SDK. In this case the API URL is handled internally by the SDK. In all other cases the application uses the WchInfoService
to access the API URL or - if available - the context.hub.apiUrl
property of the current rendering context.
The ${deliveryUrl}
is used to access static resources on WCH, e.g. to load image assets. All URLs in the rendering context that reference static assets are a suffix to this delivery URL. The application accesses this URL either via the WchInfoService
of - if available - from the context.hub.deliveryUrl
property of the current rendering context.
Let's have a look at example combinations of these URLs.
Type | URL |
---|---|
apiUrl | https://my.host.com/api/ |
deliveryUrl | https://my.host.com/ |
baseUrl | https://my.host.com/ |
resourceUrl | https://my.host.com/ |
In this section we discuss how to configure the different URLs. The goal of the configuration is to allow for each configuration option mentioned above, while keeping the redundancy at a minimum.
The resource URL is part of the <base>
tag of the index.html
file. It is typically added by the build process. Note that per spec the URL needs to be absolute. In practice however server relative URLs also work, so if the origin of the baseUrl
matches that of the resourceUrl
you can omit the origin for simplicity reasons.
The Angular CLI allows to specify this URL via the --base-href command line parameter.
This Angular build command
ng build --base-href /6f0ce0ff-8a25-4fac-b66a-5d42516247eb/
creates an index.html
file similar to the following:
<!doctype html>
<html lang="en">
<head>
<base href="/6f0ce0ff-8a25-4fac-b66a-5d42516247eb/">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<app-root></app-root>
<script type="text/javascript" src="main.js">
</body>
</html>
Either of the URLs can be derived from the other, so it is only required to configure one of them (if any).
Only configure these URLs if the deliveryUrl
is NOT a prefix of the baseUrl
. Otherwise the deliveryUrl
and the apiUrl
will be decoded from the baseUrl
, automatically. This avoids redundancy and allows you to move your application across hosts without recompilation.
If required, the configuration is done via the WchNgModule.forRoot(...)
options. We recommend to distinguish between configuration for the local development mode and remote production mode, because for local development mode the URLs have always to be configured, for production mode only for externally hosted applications.
Angular supports the concept of environments to distinguish between these development modes.
For the development setup configure the file in /src/environments/environment.ts
as follows:
export const environment = {
apiUrl: 'https://my10.digitalexperience.ibm.com/api/6f0ce0ff-8a25-4fac-b66a-5d42516247eb/',
production: false
};
in the same project define the production environment in /src/environments/environment.prod.ts
as follows:
export const environment = {
production: true
};
In /src/app/app.module.ts
include the SDK module and use the environment as a configuration object:
import { environment } from '../environments/environment';
@NgModule({
imports: [
WchNgModule.forRoot(environment),
]
})
export class AppModule {}
The build process will now pick up the correct file depending on your build options.
An alternative way to configure the API URL is via the index.html
file by adding a link with rel="wch-config-api-url"
which will be used if the WchNgModule.forRoot
configuration does not contain a value. This way to configure the URL keeps the JS code independent of absolute URLs (e.g. the tenant or sites information), so you can share the same application across multiple deployments more easily.
In /src/index.html
file add the <link rel="wch-config-api-url">
tag:
<!doctype html>
<html lang="en">
<head>
<base href="${resourceUrl}">
<link rel="wch-config-api-url" href="${apiUrl}">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<app-root></app-root>
<script type="text/javascript" src="main.js">
</body>
</html>
The precedence order of configuration lookups is WchNgModule.forRoot
> <link rel="wch-config-api-url">
> window.location
.
The base URL is the URL to address your pages with. If your application is hosted on WCH, nothing has to be configured, since the index.html
file is loaded from the location ${baseUrl}/index.html
automatically and WCH detects the base URL, automatically.
If your application is hosted externally, make sure that your external server supports the PathLocationStrategy, i.e. that all URLs that are a suffix of your ${baseUrl}
and that address application pages, serve back the content of your index.html
file. The exact setup depends on your webserver, for Apache you can find a guide here.
If you ${baseUrl}
is not identical to its origin (i.e. if it contains a context root), then you need to configure the base URL in the SDK. Follow the same pattern as for the ${apiUrl}
using the token baseUrl
.
export const environment = {
apiUrl: 'https://my10.digitalexperience.ibm.com/api/6f0ce0ff-8a25-4fac-b66a-5d42516247eb/',
baseUrl: 'https://my.host.com/contextRoot/',
production: true
};
An alternative way to configure the API URL is via the index.html
file by adding a link with rel="wch-config-base-url"
which will be used if the WchNgModule.forRoot
configuration does not contain a value. This way to configure the URL keeps the JS code independent of absolute URLs (e.g. the tenant or sites information), so you can share the same application across multiple deployments more easily.
<!doctype html>
<html lang="en">
<head>
<base href="${resourceUrl}">
<link rel="wch-config-base-url" href="${baseUrl}">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<app-root></app-root>
<script type="text/javascript" src="main.js">
</body>
</html>
The precedence order of configuration lookups is WchNgModule.forRoot
> <link rel="wch-config-base-url">
> window.location
.
In order to integrate with the authoring UI of WCH, you also need to add configuration data to the site record to tell ${baseUrl}
, so WCH can launch the application under its correct URL.
In the site.json
record, set the property externalURL
to your ${baseUrl}
:
{
"name": "Oslo",
"routingMode": "path",
"classification": "site",
"lastModified": "2018-06-11T13:30:36.148Z",
"lastModifierId": "83167ee6-1775-4d35-9ce2-16d3d6c9ca13",
"creatorId": "00000000-0000-0000-0000-000000000009",
"created": "2018-04-06T09:32:46.694Z",
"id": "default",
"rev": "4-c81514a9f76f20f4c3386adf180f0f63",
"externalURL": "https://my.host.com/contextRoot/"
}
The Angular Ahead-of-Time (AOT) compiler converts your Angular HTML and TypeScript code into efficient JavaScript code during the build phase before the browser downloads and runs that code.
FAQs
Software development kit to simplify the development of Angular based single page applications against Watson Content Hub.
We found that @ibm-wch-sdk/ng demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
Research
/Security News
175 malicious npm packages (26k+ downloads) used unpkg CDN to host redirect scripts for a credential-phishing campaign targeting 135+ organizations worldwide.
Security News
Python 3.14 adds template strings, deferred annotations, and subinterpreters, plus free-threaded mode, an experimental JIT, and Sigstore verification.