@acoustic-content-sdk/ng-app-preview 中文文档教程
包含默认配置的模块,用于在预览模式下针对声学内容运行 Angular 应用程序。
Table of Contents
General Concepts
Acoustic Content 上的应用程序可以在预览模式和实时模式下运行。 在预览模式下,它们增强了内联编辑功能并针对内联编辑体验进行了优化,在实时模式下,它们以针对大小和性能优化的只读模式运行。
运行时行为的差异是通过使用不同的依赖提供者为应用程序所依赖的服务构建应用程序两次来实现的。
预览模式的提供程序由 ng-app-preview
模块提供,实时模式的提供程序由 ng-app-live
模块提供,适用于两种模式的通用提供程序由ng-app-base
模块。
首页 @acoustic-content-sdk/ng-app-preview
ng-app-preview package
包含运行 Angular 的默认配置的模块 针对 Acoustic Content 的预览模式应用程序。
Classes
Class | Description |
---|---|
AcNgAppPreviewModule | Imports the modules required for inline edit functionality. This module makes the following choices:- Inline edit functionality is accessed from the controlling parent window - Data access is implemented by accessing the redux store - The redux store is accessed from the controlling parent windowThis module assumes that the controlling parent window runs in the same origin than the application window. If this is not the case for your application, select different providers for ACOUSTIC_TOKEN_INLINE_EDIT_PROVIDER and ACOUSTIC_TOKEN_REDUX_STORE |
Variables
Variable | Description |
---|---|
MODULE | Module name |
VERSION | Version and build number of the package |
Home > @acoustic-content-sdk/ng-app-preview > AcNgAppPreviewModule
AcNgAppPreviewModule class
导入内联编辑功能所需的模块。 该模块做出以下选择:
- Inline edit functionality is accessed from the controlling parent window - Data access is implemented by accessing the redux store - The redux store is accessed from the controlling parent window
该模块假定控制父窗口在与应用程序窗口相同的源中运行。 如果您的应用不是这种情况,请为 ACOUSTIC_TOKEN_INLINE_EDIT_PROVIDER
和 ACOUSTIC_TOKEN_REDUX_STORE
选择不同的提供商
签名:
export declare class AcNgAppPreviewModule
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(aCurrentWindow, aHostWindow, aLoggerService) | Constructs a new instance of the AcNgAppPreviewModule class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
VERSION | WchSdkVersion | Exposes the version information of this module |
首页 > @acoustic-content-sdk/ng-app-preview > MODULE
MODULE variable
Module name
Signature:
MODULE = "@acoustic-content-sdk/ng-app-preview"
Home > @acoustic-content-sdk/ng-app-preview > VERSION
VERSION variable
Version and build number of the package
Signature:
VERSION: {
version: {
major: string;
minor: string;
patch: string;
branch: string;
};
build: Date;
}
首页 > @acoustic-content-sdk/ng-app-preview > AcNgAppPreviewModule > (constructor)
AcNgAppPreviewModule.(constructor)
Constructs a new instance of the AcNgAppPreviewModule
class
Signature:
constructor(aCurrentWindow: WindowType, aHostWindow: WindowType, aLoggerService: LoggerService);
Parameters
Parameter | Type | Description |
---|---|---|
aCurrentWindow | WindowType | |
aHostWindow | WindowType | |
aLoggerService | LoggerService |
首页 > @acoustic-content-sdk/ng-app-preview > AcNgAppPreviewModule > VERSION
AcNgAppPreviewModule.VERSION property
暴露这个模块的版本信息
Signature:
VERSION: WchSdkVersion;
Module that contains a default configuration to run an Angular application against Acoustic Content in preview mode.
Table of Contents
General Concepts
Applications on Acoustic Content can run in preview mode and in live mode. In preview mode they are augmented with inline edit capabilities and optimited for inline edit experience, in live mode they run in read-only mode optimized for size and performance.
The difference in runtime behaviour is achieved by building the application twice with different dependency providers for services that the application relies on.
Providers for preview mode are supplied by the ng-app-preview
module, for live mode via the ng-app-live
module and general purpose providers that apply to both modes by the ng-app-base
module.
Home > @acoustic-content-sdk/ng-app-preview
ng-app-preview package
Module that contains a default configuration to run an Angular application against Acoustic Content in preview mode.
Classes
Class | Description |
---|---|
AcNgAppPreviewModule | Imports the modules required for inline edit functionality. This module makes the following choices:- Inline edit functionality is accessed from the controlling parent window - Data access is implemented by accessing the redux store - The redux store is accessed from the controlling parent windowThis module assumes that the controlling parent window runs in the same origin than the application window. If this is not the case for your application, select different providers for ACOUSTIC_TOKEN_INLINE_EDIT_PROVIDER and ACOUSTIC_TOKEN_REDUX_STORE |
Variables
Variable | Description |
---|---|
MODULE | Module name |
VERSION | Version and build number of the package |
Home > @acoustic-content-sdk/ng-app-preview > AcNgAppPreviewModule
AcNgAppPreviewModule class
Imports the modules required for inline edit functionality. This module makes the following choices:
- Inline edit functionality is accessed from the controlling parent window - Data access is implemented by accessing the redux store - The redux store is accessed from the controlling parent window
This module assumes that the controlling parent window runs in the same origin than the application window. If this is not the case for your application, select different providers for ACOUSTIC_TOKEN_INLINE_EDIT_PROVIDER
and ACOUSTIC_TOKEN_REDUX_STORE
Signature:
export declare class AcNgAppPreviewModule
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(aCurrentWindow, aHostWindow, aLoggerService) | Constructs a new instance of the AcNgAppPreviewModule class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
VERSION | WchSdkVersion | Exposes the version information of this module |
Home > @acoustic-content-sdk/ng-app-preview > MODULE
MODULE variable
Module name
Signature:
MODULE = "@acoustic-content-sdk/ng-app-preview"
Home > @acoustic-content-sdk/ng-app-preview > VERSION
VERSION variable
Version and build number of the package
Signature:
VERSION: {
version: {
major: string;
minor: string;
patch: string;
branch: string;
};
build: Date;
}
Home > @acoustic-content-sdk/ng-app-preview > AcNgAppPreviewModule > (constructor)
AcNgAppPreviewModule.(constructor)
Constructs a new instance of the AcNgAppPreviewModule
class
Signature:
constructor(aCurrentWindow: WindowType, aHostWindow: WindowType, aLoggerService: LoggerService);
Parameters
Parameter | Type | Description |
---|---|---|
aCurrentWindow | WindowType | |
aHostWindow | WindowType | |
aLoggerService | LoggerService |
Home > @acoustic-content-sdk/ng-app-preview > AcNgAppPreviewModule > VERSION
AcNgAppPreviewModule.VERSION property
Exposes the version information of this module
Signature:
VERSION: WchSdkVersion;