2 |
3 | This is an example widget that is yet to be implemented. You can use it as a scaffold for your own widget.
4 |
5 |
6 | Please refer to documentation to learn about
7 | widget anatomy.
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/components/click-counter/clickCounter.publish.module.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * @license
3 | * Copyright Paperbits. All Rights Reserved.
4 | *
5 | * Use of this source code is governed by an MIT-style license that can be
6 | * found in the LICENSE file and at https://paperbits.io/license/mit.
7 | */
8 |
9 | import { IInjector, IInjectorModule } from "@paperbits/common/injection";
10 | import { IWidgetService } from "@paperbits/common/widgets";
11 | import { KnockoutComponentBinder } from "@paperbits/core/ko/knockoutComponentBinder";
12 | import { ClickCounter } from "./clickCounter";
13 | import { ClickCounterModel } from "./clickCounterModel";
14 | import { ClickCounterModelBinder } from "./clickCounterModelBinder";
15 | import { ClickCounterViewModelBinder } from "./clickCounterViewModelBinder";
16 |
17 | export class ClickCounterModule implements IInjectorModule {
18 | public register(injector: IInjector): void {
19 | injector.bind("clickCounter", ClickCounter);
20 | injector.bindSingleton("clickCounterModelBinder", ClickCounterModelBinder);
21 | injector.bindSingleton("clickCounterViewModelBinder", ClickCounterViewModelBinder);
22 |
23 | const widgetService = injector.resolve