@acoustic-content-sdk/ng-app-base 中文文档教程

发布于 4年前 浏览 10 更新于 3年前

npm

方便模块,用于引入在实时和预览模式下都需要的通用应用程序依赖项。 您可能希望在基本应用程序模块中使用此模块来引入典型的 SDK 依赖项。

示例

import { AcNgAppBaseModule } from '@acoustic-content-sdk/ng-app-base';

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    RouterModule.forRoot(routes, { useHash: false }),
    AcNgAppBaseModule,
    ...MODULES
  ]
})
export class AppModule {}

Table of Contents

General Concepts

声音内容上的应用程序可以在预览模式和实时模式下运行。 在预览模式下,它们增强了内联编辑功能并针对内联编辑体验进行了优化,在实时模式下,它们以针对大小和性能优化的只读模式运行。

运行时行为的差异是通过使用不同的依赖提供者为应用程序所依赖的服务构建应用程序两次来实现的。

预览模式的提供程序由 ng-app-preview 模块提供,实时模式的提供程序由 ng-app-live 模块提供,适用于两种模式的通用提供程序由ng-app-base 模块。

Home > @acoustic-content-sdk/ng-app-base

ng-app-base package

包含运行 Angular 的默认配置的模块 针对 Acoustic Content 的实时和预览模式应用程序。

Classes

ClassDescription
AcNgAppBaseModuleImports the modules required for basic functionality

Variables

VariableDescription
MODULEModule name
VERSIONVersion and build number of the package

Home > @acoustic-content-sdk/ng-app-base > AcNgAppBaseModule

AcNgAppBaseModule class

Imports the modules required for basic functionality

Signature:

export declare class AcNgAppBaseModule 

Constructors

ConstructorModifiersDescription
(constructor)(aLoggerService)Constructs a new instance of the AcNgAppBaseModule class

Properties

PropertyModifiersTypeDescription
VERSIONWchSdkVersionExposes the version information of this module

首页 > @acoustic-content-sdk/ng-app-base > MODULE

MODULE variable

Module name

Signature:

MODULE = "@acoustic-content-sdk/ng-app-base"

Home > @acoustic-content-sdk/ng-app-base > 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-base > AcNgAppBaseModule > (constructor)

AcNgAppBaseModule.(constructor)

Constructs a new instance of the AcNgAppBaseModule class

Signature:

constructor(aLoggerService: LoggerService);

Parameters

ParameterTypeDescription
aLoggerServiceLoggerService

主页 > @acoustic-content-sdk/ng-app-base > AcNgAppBaseModule > VERSION

AcNgAppBaseModule.VERSION property

暴露这个模块的版本信息

Signature:

VERSION: WchSdkVersion;

npm

Convenience module to pull in generic application dependencies that are required both in live and preview mode. You might want to use this module in the basic application module to pull in the typical SDK dependencies.

Example:

import { AcNgAppBaseModule } from '@acoustic-content-sdk/ng-app-base';

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    RouterModule.forRoot(routes, { useHash: false }),
    AcNgAppBaseModule,
    ...MODULES
  ]
})
export class AppModule {}

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-base

ng-app-base package

Module that contains a default configuration to run an Angular application against Acoustic Content in live and preview mode.

Classes

ClassDescription
AcNgAppBaseModuleImports the modules required for basic functionality

Variables

VariableDescription
MODULEModule name
VERSIONVersion and build number of the package

Home > @acoustic-content-sdk/ng-app-base > AcNgAppBaseModule

AcNgAppBaseModule class

Imports the modules required for basic functionality

Signature:

export declare class AcNgAppBaseModule 

Constructors

ConstructorModifiersDescription
(constructor)(aLoggerService)Constructs a new instance of the AcNgAppBaseModule class

Properties

PropertyModifiersTypeDescription
VERSIONWchSdkVersionExposes the version information of this module

Home > @acoustic-content-sdk/ng-app-base > MODULE

MODULE variable

Module name

Signature:

MODULE = "@acoustic-content-sdk/ng-app-base"

Home > @acoustic-content-sdk/ng-app-base > 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-base > AcNgAppBaseModule > (constructor)

AcNgAppBaseModule.(constructor)

Constructs a new instance of the AcNgAppBaseModule class

Signature:

constructor(aLoggerService: LoggerService);

Parameters

ParameterTypeDescription
aLoggerServiceLoggerService

Home > @acoustic-content-sdk/ng-app-base > AcNgAppBaseModule > VERSION

AcNgAppBaseModule.VERSION property

Exposes the version information of this module

Signature:

VERSION: WchSdkVersion;
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文