jQWidgets Forums

jQuery UI Widgets Forums Angular Use jqwidgets with angular 6

This topic contains 3 replies, has 2 voices, and was last updated by  Martin 7 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Use jqwidgets with angular 6 #100366

    vatit
    Participant

    Hi,

    I’m using Angular 6 project with setup using Angular CLI.
    I followed the documentation (Angular) and added jqxBarGauge to my project. ( follow : https://www.jqwidgets.com/angular-components-documentation/documentation/angular-cli/angular-cli.htm?search=)

    now, I want to add jqxSchedule to my project, but not successfully.

    I used code:

    import { Component } from ‘@angular/core’;

    import { jqxSchedulerComponent } from ‘../assets/jqwidgets-ts/angular_jqxscheduler’;
    Mark a class as an Angular component through the @Component decorator:

    @Component({
    selector: “app-root”,
    template: `
    <jqxScheduler #schedulerReference
    [date]=”date” [width]=”800″ [height]=”600″ [source]=”dataAdapter” [showLegend]=”true” [view]=”‘weekView'”
    [appointmentDataFields]=”appointmentDataFields” [resources]=”resources” [views]=”views”>
    </jqxScheduler>`
    })

    not found jqxScheduler in “../assets/jqwidgets-ts/angular_jqxscheduler”. All jqwidgets, i download them by npm, and them were in node_modules directory, not in assets.

    Pls help me used jqxSchedule in my project.
    Thank you very much.
    Best Regards,

    Use jqwidgets with angular 6 #100371

    Martin
    Participant

    Hello vatit,

    Try importing the jqxScheduler the same way as the jqxBarGauge is imported:
    import { jqxSchedulerComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxscheduler';

    I’m not quite sure why are you searching it in assets, if it is not there.

    Also, make sure that you added "node_modules/jqwidgets-scripts/jqwidgets-ts/angular_jqxscheduler.ts" in the tsconfig.json files array.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

    Use jqwidgets with angular 6 #100377

    vatit
    Participant

    Thanks, i got it.

    when i set with = 1300 from ts code, the bound changed width to 1300, but view inside the bound width changed to default (800).

    do you tell me why and help me resolve it.

    Thank you

    Use jqwidgets with angular 6 #100382

    Martin
    Participant

    Sure. It depends on where you set the property.
    Try setting it in the ngAfterViewInit lifecycle hook, because the elements are not created before that.
    However, I suggest you passing the width property as well as the other properties as attributes in the html.

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.