/* Copyright © 2016-2019 Lidor Systems. All rights reserved. This file is part of the "IntegralUI Web" Library. The contents of this file are subject to the IntegralUI Web License, and may not be used except in compliance with the License. A copy of the License should have been installed in the product's root installation directory or it can be found at http://www.lidorsystems.com/products/web/studio/license-agreement.aspx. This SOFTWARE is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Any infringement will be prosecuted under applicable laws. */ import { Component, ViewContainerRef, ViewChild, ViewChildren, ViewEncapsulation } from '@angular/core'; import { IntegralUIAccordion } from '../../integralui/components/integralui.accordion'; @Component({ selector: '', template: `
An example on how to add a Context Menu to Accordion component. The sample also shows how to edit the group title using a simple text editor.
By right-clicking over Accordion, a context menu will popup showing options where to add a new group. When an option is selected, a group is created and placed at specified position. Then, a text editor appears where you can enter the group title.
Note You can set up a different context menu to each group. In this sample, all groups share the same context menu.
When group title is clicked, a text editor will appear where you can enter a new title for the group.
For more information check out the source code of this sample (accordion/accordion-add-group-with-context-menu.ts) file, or read the following article:
Add Group Dynamically with Context Menu in Angular Accordion