Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi, I need one help. Can you please help me to convert the following ngx template to ngx directive? Thanks in advance. I am getting JSON parsing error . #19

Closed
Souvik93 opened this issue Jun 21, 2017 · 2 comments

Comments

@Souvik93
Copy link

 <div class="builder-source" fxFlex="20%">
          <h4>Source</h4>

          <ngx-dnd-container
            class="root-container"
            [model]="sourceBuilderTools"
            [dropZones]="['builder-target']"
            [copy]="true"
            [droppableItemClass]="droppableItemClass"
            (drag)="builderDrag($event)">

            <ng-template let-item="model">
              <ngx-icon [fontIcon]="item.icon"></ngx-icon>
              {{item.name}}
            </ng-template>
          </ngx-dnd-container>

        </div>
        <div class="builder-target" fxFlex="60%">
          <h4>Target</h4>

          <ngx-dnd-container
            class="root-container"
            [model]="targetBuilderTools"
            dropZone="builder-target"
            [removeOnSpill]="true"
            [droppableItemClass]="droppableItemClass"
            (drag)="log($event)"
            (drop)="log($event)"
            (over)="log($event)"
            (out)="log($event)"
            (remove)="log($event)">

            <ng-template let-model="model" let-template="template">
              <div [ngSwitch]="model.inputType">
                <div *ngSwitchCase="'section'">
                   <ngx-section class="shadow" [sectionTitle]="model.name">
                     <ngx-dnd-container
                       dropZone="builder-target"
                       [model]="model.children"
                       [removeOnSpill]="true"
                       [template]="template"
                       [droppableItemClass]="droppableItemClass"
                       (drag)="log($event)"
                       (drop)="log($event)"
                       (over)="log($event)"
                       (out)="log($event)"
                       (remove)="log($event)">
                     </ngx-dnd-container>
                   </ngx-section>
                </div>
                <div *ngSwitchDefault>
                  <ngx-input
                    [type]="model.inputType"
                    [hint]="model.name"
                    [autofocus]="false"
                    [ngModel]="model.data">
                  </ngx-input>
                </div>
              </div>
            </ng-template>
          </ngx-dnd-container>
        </div>
        <div fxFlex>
          <h3>Model</h3>
          <pre><code>{{targetBuilderTools | json}}</code></pre>
        </div>
      </div>
@Souvik93 Souvik93 changed the title Hi, I need one help. Can you please help me to convert the following ngx template to ngx directive? Thanks in advance Hi, I need one help. Can you please help me to convert the following ngx template to ngx directive? Thanks in advance. I am getting JSON parsing error . Jun 21, 2017
@Hypercubed
Copy link
Contributor

Hello Souvik, I'm sorry but I am not able to fulfill support request on GitHub. Please either rephrase your question as a bug (for example missing documentation) or seek support elsewhere.

@isawk
Copy link

isawk commented May 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants