• Getting Started
  • Components
    • Barcodes
    • Buttons
    • Chartsupdated
    • Conversational UIupdated
    • Data Query
    • Date Inputsupdated
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Filter
    • Gantt
    • Gauges
    • Gridupdated
    • Icons
    • Indicators
    • Inputsupdated
    • Labels
    • Layout
    • ListBox
    • ListView
    • Map
    • Menus
    • Navigation
    • Notification
    • Pager
    • PDF Export
    • PDFViewer
    • PivotGridupdated
    • Popup
    • ProgressBars
    • Ripple
    • Schedulerupdated
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • ToolBar
    • Tooltips
    • TreeList
    • TreeView
    • Typography
    • Uploads
    • Utilities
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Sample Applications
  • FAQ
  • Troubleshooting
  • Updates
  • Changelogs

Getting Started with the Kendo UI for Angular Dialogs

This guide provides the information you need to start using the Kendo UI for Angular Dialogs—it includes instructions about the available installation approaches, the required dependencies, the code for running the project, and links to additional resources.

The Dialogs Package is part of Kendo UI for Angular, a professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

After the completion of this guide, you will be able to achieve an end result as demonstrated in the following example.

Example
View Source
Change Theme:

Setting Up Your Angular Project

Before you start with the installation of any Kendo UI for Angular control, ensure that you have a running Angular project. The prerequisites to accomplish the installation of the components are always the same regardless of the Kendo UI for Angular package you want to use, and are fully described in the section on setting up your Angular project.

Installing the Components

You can choose to use either of the following two approaches for installing the Kendo UI for Angular package and the styles you want to apply:

Quick Setup with Angular CLI

The quick setup presents an automatic approach for adding packages with Angular CLI through the ng-add command. It is suitable for saving time and efforts as ng-add executes in a single step a set of otherwise individually needed commands.

To add the Kendo UI for Angular Dialogs package, run the following command.

ng add @progress/kendo-angular-dialog

As a result, the ng-add command will perform the following actions:

  • Add the @progress/kendo-angular-dialog package as a dependency to the package.json file.
  • Import the DialogsModule in the current application's main module (only if the application uses NgModules).

    If your application uses standalone components, you must import the DialogsModule manually.

  • Register the Kendo UI Default theme in the angular.json file.
  • Add all required peer dependencies to the package.json file.
  • Trigger npm install to install the theme and all peer packages that are added.

Manual Setup

The manual setup provides greater visibility and better control over the files and references installed in your Angular application. You can install the required peer dependencies and a Kendo UI theme by running separate commands for each step and import the desired component modules in your NgModule.

  1. Install the Dialogs package together with its dependencies by running the following command:

    npm install --save @progress/kendo-angular-dialog @progress/kendo-angular-buttons @progress/kendo-angular-popup @progress/kendo-angular-l10n @progress/kendo-angular-common @progress/kendo-licensing @progress/kendo-angular-icons
  2. If you need all Dialogs components in your application, import all Dialogs at once by using the DialogsModule. Otherwise import the specific components by adding their individual modules.

    The Dialogs package exports the following individual modules for its components:

    ModuleComponent
    DialogModuleDialog
    WindowModuleWindow

    Depending on your Angular application, import the Dialogs either into your NgModule or standalone components:

    • Using Modules

      • To add all Dialogs components, import the DialogsModule in your NgModule.

            import { NgModule } from '@angular/core';
            import { BrowserModule } from '@angular/platform-browser';
            import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
            import { DialogsModule } from '@progress/kendo-angular-dialog';
            import { AppComponent } from './app.component';
        
            @NgModule({
                bootstrap:    [AppComponent],
                declarations: [AppComponent],
                imports:      [BrowserModule, BrowserAnimationsModule, DialogsModule]
            })
            export class AppModule {
            }
      • To add individual Dialogs components, import only the modules you need in your NgModule.

            import { NgModule } from '@angular/core';
            import { BrowserModule } from '@angular/platform-browser';
            import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
            import { AppComponent } from './app.component';
        
            // Imports the Dialog
            import { WindowModule } from '@progress/kendo-angular-dialog';
        
            @NgModule({
                bootstrap: [AppComponent],
                declarations: [AppComponent],
                imports: [BrowserModule, BrowserAnimationsModule, WindowModule]
            })
            export class AppModule {}
    • Using Standalone Components

      • To add all Dialogs components, import DialogsModule in your standalone component.

        import { Component } from '@angular/core';
        import { DialogsModule } from '@progress/kendo-angular-dialog';
        
        @Component({
            standalone: true,
            selector: 'my-app',
            imports: [DialogsModule],
            template: `
                <kendo-dialog title="My Title"></kendo-dialog>
                <kendo-window title="My Title"></kendo-window>
            `
        })
      • To add individual Dialogs components, import only the modules you need in your standalone component.

        import { Component } from '@angular/core';
        import { WindowModule } from '@progress/kendo-angular-dialog';
        
        @Component({
            standalone: true,
            selector: 'my-app',
            imports: [WindowModule],
            template: `
                <kendo-window title="My Title"></kendo-window>
            `
        })
  3. The next step is to style the components by installing one of the available Kendo UI themes—Kendo UI Default, Kendo UI Material, or Kendo UI Bootstrap.

    3.1 To start using a theme, install its package through NPM.

    • Default theme

      npm install --save @progress/kendo-theme-default
    • Bootstrap theme

      npm install --save @progress/kendo-theme-bootstrap
    • Material theme

      npm install --save @progress/kendo-theme-material

    3.2 After the theme package is installed, reference it in your project. You can include a Kendo UI theme in your project in one of the following ways:

  4. For Angular 9.x and later, install the @angular/localize package:

    4.1 Run npm install --save @angular/localize.

    4.2 Add import '@angular/localize/init'; to your src/polyfills.ts file.

Using the Components

  1. After successfully installing the Dialogs package and importing the desired modules, add the corresponding tags of the components you need in the app.component.html. For example, if you need the Dialog component, add the following code:

    <kendo-dialog title="Please confirm" >
        <p>Are you sure you want to continue?</p>
        <kendo-dialog-actions>
            <button kendoButton (click)="close()">No</button>
            <button kendoButton (click)="close()" themeColor="primary">Yes</button>
        </kendo-dialog-actions>
    </kendo-dialog>
  2. Build and serve the application by running the following command in the root folder.

    ng serve
  3. Point your browser to http://localhost:4200 to see the Kendo UI for Angular Dialog component on the page.

Activating Your License Key

As of December 2020, using any of the UI components from the Kendo UI for Angular library requires either a commercial license key or an active trial license key. If your application does not contain a Kendo UI license file, activate your license key.

Next Steps

Dependencies

The following table lists the specific functionalities that are provided by each of the Dialogs dependencies as per package:

Package NameDescription
@angular/commonProvides the commonly-needed services, pipes, and directives provided by the Angular team. For more information, refer to the official Angular documentation.
@angular/coreContains critical runtime parts of the Angular framework that are needed by every application. For more information, refer to the official Angular documentation.
@angular/animationsContains the library of Angular animations. For more information, refer to the official Angular documentation.
@progress/kendo-angular-iconsContains the Kendo UI for Angular Icons.
@progress/kendo-angular-l10nProvides the globalization features of Kendo UI for Angular.
@progress/kendo-angular-popupContains the Kendo UI for Angular Popup component.
@progress/kendo-angular-buttonsContains the Kendo UI for Angular Buttons components.
@progress/kendo-angular-commonContains common utilities that are needed by every Kendo UI for Angular component.
@progress/kendo-licensingContains the kendo-ui-license CLI utility for license management and the internal infrastructure related to licensing.
rxjsProvides the RxJS library for reactive programming which uses Observables for an easier composition of asynchronous or callback-based code.

Learning Resources