Angular UI Components Documentation
The Angular Docking enables the user to add windows and change their layout. This guide adds the Angular Docking (jqxDocking) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-ngjqwidgets-ng/jqxdocking 
In an Angular project (to start one, see Getting started with Angular), add the package with the Angular CLI. It asks for a theme and adds the styles to angular.json:
ng add jqwidgets-ng
Components are standalone: add jqxDockingModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxDockingModule } from 'jqwidgets-ng/jqxdocking';
@Component({
selector: 'app-root',
imports: [jqxDockingModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Default Functionality demo.
<jqxDocking [orientation]='"horizontal"' [width]='getWidth()' [mode]='"docked"'>
<div>
<div id="window1" style="height: 235px;">
<div>
Date and Time
</div>
<div style="overflow: hidden;">
<jqxCalendar [width]='180' [height]='180' style="float: left; margin-right: 10px;">
</jqxCalendar>
<h3 style="text-align: center; color: #787878;">Sunny</h3>
<div style="float: left; margin-left: 30px; text-align: center;">
<img src="https://www.jqwidgets.com/angular/images/sun-icon.png" alt="Sunny" />
</div>
<div style="text-align: left; margin-left: 5px; margin-top: 10px; font-size: 10px; float: right; margin-right: 20px;">
Mo: 23 °C<br />
To 25 °C<br />
We: 27 °C
</div>
</div>
</div>
<div id="window2" style="height: 235px">
<div>
News
</div>
<div style="overflow: hidden;">
<jqxTabs [width]='375' [height]='181' [selectedItem]='1'>
<ul style="margin-left: 30px">
<li>World</li>
<li>Local</li>
<li>Sports</li>
</ul>
<div>
<div style="padding: 3px; margin: 10px; width: 150px; height: 84px; float: left;">
<img src="https://www.jqwidgets.com/angular/images/news_ie6.jpg" alt="IE6" title="IE6" />
</div>
<span style="font-size: 11px;">
Microsoft is set to get a little more pushy ensuring
you have an up-to-date browser and will automatically update Internet Explorer...
<span style="font-size: 8px;">(BBC)</span>
</span>
</div>
<div>
<div style="padding: 3px; margin: 10px; width: 144px; height: 81px; float: left;">
<img src="https://www.jqwidgets.com/angular/images/local.jpg" alt="Tennis" title="Tennis" />
</div>
<span style="font-size: 11px;">
The High Court has dismissed a challenge to laws that
require immigrant spouses to be able to speak English in order to live in the UK...
<span style="font-size: 8px;">(BBC)</span>
</span>
</div>
<div>
<div style="padding: 3px; margin: 10px; width: 130px; height: 73px; float: left;">
<img src="https://www.jqwidgets.com/angular/images/tennis.jpg" alt="Tennis" title="Tennis" />
</div>
<span style="font-size: 11px;">
British number one Elena Baltacha says Judy Murray is
a "fantastic" appointment as Great Britain's new Fed Cup captain... <span style="font-size: 8px;">(BBC)</span>
</span>
</div>
</jqxTabs>
</div>
</div>
</div>
<div>
<div id="window3" style="height: 235px">
<div>
Zodiac
</div>
<div style="overflow: hidden;">
<jqxPanel [width]='375' [height]='180'>
<div style="padding-right: 20px;">
<div style="padding: 3px; width: 150px; height: 110px; float: left; margin: 10px;">
<img src="https://www.jqwidgets.com/angular/images/leo.jpg" alt="Leo" title="Leo" />
</div>
<h3 style="text-align: center; color: #787878;">Leo</h3>
<span style="font-size: 11px">
Individuals born under the zodiac sign of Leo are very
good looking and have a healthy physique, with a broad forehead. Leo are very intelligent,
extremely courageous, love their freedom and live by their own rules. Indulgence
and extravagance is like second nature to them and they love to...
</span>
</div>
</jqxPanel>
</div>
</div>
<div id="window4" style="height: 235px;">
<div>
E-mail
</div>
<div style="overflow: hidden;">
<jqxListBox [width]='375' [height]='181' [source]='source'>
</jqxListBox>
</div>
</div>
</div>
</jqxDocking>import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { jqxDockingModule } from 'jqwidgets-ng/jqxdocking';
import { jqxCalendarModule } from 'jqwidgets-ng/jqxcalendar';
import { jqxTabsModule } from 'jqwidgets-ng/jqxtabs';
import { jqxListBoxModule } from 'jqwidgets-ng/jqxlistbox';
import { jqxPanelModule } from 'jqwidgets-ng/jqxpanel';
@Component({
imports: [
CommonModule,
jqxDockingModule,
jqxCalendarModule,
jqxTabsModule,
jqxListBoxModule,
jqxPanelModule
],
selector: 'app-root',
templateUrl: './app.html'
})
export class App {
getWidth(): any {
if (document.body.offsetWidth < 800) {
return '90%';
}
return 800;
}
source: string[] = [
'JavaScript Certification - Welcome to our network',
'Business Challenges via Web take a part',
'jQWidgets better web, less time. Take a tour',
'Facebook - you have 7 new notifications',
'Twitter - John Doe is following you. Look at his profile',
'New videos, take a look at YouTube.com'
];
}
Options are inputs, bound with [name]="value".
Events are outputs named on plus the event name with a capital first letter. For example, dragStart: This event is triggered when the user start to drag any window.
<jqxDocking (onDragStart)="onDragStart($event)"></jqxDocking>
onDragStart(event: any): void {
console.log(event.args);
}
Get the component with a signal query and call its methods. For example, focus: Focuses the widget.
<jqxDocking #myDocking></jqxDocking>
import { Component, viewChild } from '@angular/core';
import { jqxDockingModule, jqxDockingComponent } from 'jqwidgets-ng/jqxdocking';
@Component({
selector: 'app-root',
imports: [jqxDockingModule],
templateUrl: './app.html'
})
export class App {
readonly myDocking = viewChild.required<jqxDockingComponent>('myDocking');
run(): void {
this.myDocking().focus();
}
}