We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 am facing an issue while compiling. can some help me to fix this issue.
Error Message as below
ERROR in src/app/components/gantt.component.ts(19,3): error TS2554: Expected 2 arguments, but got 1.
@ViewChild('gantt_here') ganttContainer: ElementRef;
Code `import { Component, ElementRef, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { TaskService } from '../services/task.service'; import { LinkService } from '../services/link.service'; import { Task } from '../models/task'; import { Link } from '../models/link';
import 'dhtmlx-gantt';
@component({ encapsulation: ViewEncapsulation.None, // tslint:disable-next-line:component-selector selector: 'gantt', styleUrls: ['./gantt.component.css'], providers: [TaskService, LinkService], template: <div #gantt_here class='gantt-chart'></div>, })
<div #gantt_here class='gantt-chart'></div>
export class GanttComponent implements OnInit { @ViewChild('gantt_here') ganttContainer: ElementRef;
constructor(private taskService: TaskService, private linkService: LinkService) { } ngOnInit() { gantt.config.xml_date = '%Y-%m-%d %H:%i'; gantt.init(this.ganttContainer.nativeElement); const dp = gantt.createDataProcessor({ task: { update: (data: Task) => this.taskService.update(data), create: (data: Task) => this.taskService.insert(data), delete: (id) => this.taskService.remove(id) }, link: { update: (data: Link) => this.linkService.update(data), create: (data: Link) => this.linkService.insert(data), delete: (id) => this.linkService.remove(id) } }); Promise.all([this.taskService.get(), this.linkService.get()]) .then(([data, links]) => { gantt.parse({ data, links }); }); }
}`
The text was updated successfully, but these errors were encountered:
Hello, In case if you still need help, you need to replace the following string:
@component({
to this one:
@Component({
And this string:
template: <div #gantt_here class='gantt-chart'></div>,
template: `<div #gantt_here class='gantt-chart'></div>`,
Sorry, something went wrong.
Hi All,
For the scheduler i am getting this error what need to do please help
@nithin-neewee, DHTMLX Scheduler is a different component. I don't think it is a good idea to discuss it here. Please, create a new topic here: https://forum.dhtmlx.com/c/scheduler-all
And if you have the license, you can submit the support request according to the instructions in the email with the license.
It will take less time to resolve the issue if you provide the steps to reproduce it or send a ready demo.
No branches or pull requests
Hi
I am facing an issue while compiling. can some help me to fix this issue.
Error Message as below
ERROR in src/app/components/gantt.component.ts(19,3): error TS2554: Expected 2 arguments, but got 1.
@ViewChild('gantt_here') ganttContainer: ElementRef;
Code
`import { Component, ElementRef, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { TaskService } from '../services/task.service';
import { LinkService } from '../services/link.service';
import { Task } from '../models/task';
import { Link } from '../models/link';
import 'dhtmlx-gantt';
@component({
encapsulation: ViewEncapsulation.None,
// tslint:disable-next-line:component-selector
selector: 'gantt',
styleUrls: ['./gantt.component.css'],
providers: [TaskService, LinkService],
template:
<div #gantt_here class='gantt-chart'></div>
,})
export class GanttComponent implements OnInit {
@ViewChild('gantt_here') ganttContainer: ElementRef;
}`
The text was updated successfully, but these errors were encountered: