Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

how to keep rebind notifier keys dynamically in the templates  #40

@jithureddy

Description

@jithureddy

Hello guys...
I have different containers and each has it's own controller and template. So I have ng-repeat for some items in each container.
Here I want to have bind notifier dynamically generated in the controller like below so that I can specifically update only single container ng-repeat.

Current Implementation

<div layout="column" ng-repeat="item in :refresh:$ctrl.iteration.work_items | limitTo : $ctrl.maxLimitOfItems" ng-repeat-end-custom="$ctrl.loadRemainingItems()" class="dragged-work-item-element work-item-space-top" id={{::item._id}}child data-item-type="parent" ng-show="item.isFilter" > </div>

Expected Implementation
HTML
<div layout="column" ng-repeat="item in :$ctrl.refreshKeyWord:$ctrl.folder.items | limitTo : $ctrl.maxLimitOfItems" ng-repeat-end-custom="$ctrl.loadRemainingItems()" class="dragged-work-item-element work-item-space-top" id={{::item._id}}child data-item-type="parent" ng-show="item.isFilter" > </div>

Controller logic:

during initialisation

self.refreshKeyWord = 'refreshItems'+self.folder._id;

After some event

$rootScope.$broadcast('$$rebind::refreshItems'+self.folder._id);

Currently I am using one notifier key to render all of items for all containers.

Please help me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions