How to use the knockout.observableArray function in knockout

To help you get started, we’ve selected a few knockout examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paperbits / paperbits-core / src / workshops / media / ko / mediaSelector.ts View on Github external
constructor(
        private readonly eventManager: EventManager,
        private readonly mediaService: IMediaService,
        private readonly viewManager: ViewManager,
        private readonly widgetService: IWidgetService
    ) {
        // setting up...
        this.mediaItems = ko.observableArray();
        this.selectedMedia = ko.observable();
        this.searchPattern = ko.observable();
        this.working = ko.observable(true);
    }
github paperbits / paperbits-core / src / workshops / tray / tray.ts View on Github external
constructor(
        private readonly trayCommands: ToolButton[],
        private readonly roleService: RoleService,
        private readonly viewManager: ViewManager,
    ) {
        this.buttons = ko.observableArray(trayCommands);
        this.availableRoles = ko.observableArray();
        this.selectedRoles = ko.observableArray();
    }
github paperbits / paperbits-core / src / workshops / roles / ko / role-input.ts View on Github external
constructor(private readonly roleService: RoleService) {
        this.availableRoles = ko.observableArray();
        this.selectedRoles = ko.observableArray();
        this.selectedRolesDisplay = ko.observable();
    }
github paperbits / paperbits-core / src / workshops / roles / ko / role-selector.ts View on Github external
constructor() {
        this.availableRoles = ko.observableArray();
        this.selectedRoles = ko.observableArray();
    }
github Azure / api-management-developer-portal / src / components / apis / list-of-apis / ko / runtime / api-list.ts View on Github external
constructor(
        private readonly apiService: ApiService,
        private readonly routeHelper: RouteHelper
    ) {
        this.detailsPageUrl = ko.observable();
        this.allowSelection = ko.observable(false);
        this.apis = ko.observableArray([]);
        this.working = ko.observable();
        this.pattern = ko.observable();
        this.page = ko.observable(1);
        this.hasPrevPage = ko.observable();
        this.hasNextPage = ko.observable();
        this.hasPager = ko.computed(() => this.hasPrevPage() || this.hasNextPage());
        this.apiGroups = ko.observableArray();
        this.groupByTag = ko.observable(false);
    }

knockout

Knockout makes it easier to create rich, responsive UIs with JavaScript

MIT
Latest version published 5 years ago

Package Health Score

59 / 100
Full package analysis