<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rajeshwari Pandinagarajan</title>
    <description>The latest articles on DEV Community by Rajeshwari Pandinagarajan (@rajiumapandi).</description>
    <link>https://dev.to/rajiumapandi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F903765%2Ff4e582ec-c570-4b0f-92e8-42fd5321a147.png</url>
      <title>DEV Community: Rajeshwari Pandinagarajan</title>
      <link>https://dev.to/rajiumapandi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rajiumapandi"/>
    <language>en</language>
    <item>
      <title>7 Signs of Technical Debt in Vibe Coding and How to Refactor</title>
      <dc:creator>Rajeshwari Pandinagarajan</dc:creator>
      <pubDate>Fri, 06 Nov 2026 03:56:16 +0000</pubDate>
      <link>https://dev.to/syncfusion/7-signs-of-technical-debt-in-vibe-coding-and-how-to-refactor-348n</link>
      <guid>https://dev.to/syncfusion/7-signs-of-technical-debt-in-vibe-coding-and-how-to-refactor-348n</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; &lt;em&gt;Vibe coding helps developers build features quickly, but repeated AI-generated changes can leave behind duplicated logic, inconsistent patterns, and code that is difficult to maintain. Learn seven warning signs of technical debt, how to audit a feature across its changes, and a practical approach for deciding what to refactor.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;A developer asks an AI coding assistant to create a function. Another prompt adds validation, and a third handles an edge case. Within a short time, the feature is implemented, the code compiles, and the tests pass.&lt;/p&gt;

&lt;p&gt;Everything appears to be working as expected. But then comes a small change.&lt;/p&gt;

&lt;p&gt;You revisit the code and find duplicated logic, business rules scattered across files, and components with unnecessary dependencies. What seemed like a straightforward implementation has become more difficult to modify.&lt;/p&gt;

&lt;p&gt;This is one of the challenges of AI-assisted development. When generated code is accepted without considering the overall application architecture, quick solutions can gradually introduce technical debt.&lt;/p&gt;

&lt;p&gt;Let’s explore why this happens, how to identify the warning signs, and what developers can do to keep AI-generated code maintainable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Vibe Coding Technical Debt?
&lt;/h2&gt;

&lt;p&gt;Vibe coding is an informal way of building software through iterative conversations with AI. You describe what you want, an AI assistant generates or modifies code, and you refine the result through further prompts.&lt;/p&gt;

&lt;p&gt;Technical debt refers to design or implementation decisions that make software harder or more expensive to maintain, extend, or modify later. A solution may work today but still make future changes more difficult. Technical debt is not necessarily a bug, although debt and defects can exist together.&lt;/p&gt;

&lt;p&gt;AI-generated technical debt can be difficult to notice because the code may run and tests may pass, even when coverage is incomplete. An assistant may also suggest a solution that works for the immediate request but duplicates an existing implementation or conflicts with a project convention.&lt;/p&gt;

&lt;p&gt;The important distinction is between a change that works for the current task and a change that fits the application as a whole.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it happens
&lt;/h2&gt;

&lt;p&gt;Imagine asking an AI assistant to add authentication to an endpoint. It adds a token check at the beginning of the function. The endpoint works.&lt;/p&gt;

&lt;p&gt;The next week, you need rate limiting. Another conditional is added. Then, you request logging, guest-user handling, and an administrator exception.&lt;/p&gt;

&lt;p&gt;After several changes, the endpoint may contain authentication, authorization, rate limiting, logging, and business logic in one function. Testing becomes more complicated, and each new change has more responsibilities to consider.&lt;/p&gt;

&lt;p&gt;The pattern can spread across the application. Different endpoints may end up with slightly different authentication implementations, duplicated rate-limiting logic, and inconsistent administrator checks. Each change may work in isolation, while the accumulation makes the code harder to maintain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before vs. After vs. Refactored
&lt;/h2&gt;

&lt;p&gt;Here’s a simplified JavaScript example of how an endpoint can become a patchwork of unrelated responsibilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Before: Clean service function
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getUserProfile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  After: Patchwork function
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getUserProfile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;No token&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Decoding does not verify the token signature.&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;decoded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;jwt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;decoded&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Invalid token&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isAdmin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;admins&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;decoded&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;isAdmin&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;recentCalls&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;redis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`calls:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;decoded&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;recentCalls&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Rate limited&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Fetching profile for &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;decoded&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isAdmin&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;guestAccess&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Special handling for guest administrators&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example intentionally shows responsibilities accumulating in one function. It is not a recommended authentication implementation. In particular, &lt;strong&gt;jwt.decode()&lt;/strong&gt; only decodes a token; it does not verify its signature. Decoding alone must not be used to authenticate a request.&lt;/p&gt;

&lt;h3&gt;
  
  
  After refactoring: Separate responsibilities
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Authentication middleware verifies the token.&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;authMiddleware&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;authorization&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/^Bearer&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="sr"&gt;+/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;401&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Authentication required&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;jwt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;verify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;JWT_SECRET&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;401&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Invalid or expired token&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// The service is configured separately from the route handler.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rateLimiter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;RateLimitService&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Rate limiting is handled separately.&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;rateLimitMiddleware&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;allowed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;rateLimiter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isAllowed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;allowed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;429&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Rate limited&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// The endpoint focuses on retrieving the signed-in user's profile.&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getUserProfile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;404&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;User not found&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Profile accessed by &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Example Express route; middleware order matters.&lt;/span&gt;
&lt;span class="nx"&gt;router&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/profile&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;authMiddleware&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rateLimitMiddleware&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getUserProfile&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an illustrative Express-style example. It assumes that the JWT secret, database, logger, and rate-limiter service are configured, and that the application has appropriate error-handling middleware. The route applies authentication before rate limiting and the endpoint. Applications that allow access to other users’ profiles also need an explicit authorization check.&lt;/p&gt;

&lt;p&gt;The improvement is not simply fewer lines. Each part now has a clear responsibility, and the route makes the request flow visible. That makes the code easier to review and gives developers clearer places to test authentication, rate limiting, and profile retrieval independently.&lt;/p&gt;

&lt;h2&gt;
  
  
  7 signs your vibe-coded project is becoming patchwork
&lt;/h2&gt;

&lt;p&gt;These signs are prompts for investigation, not a formal scoring standard. One sign alone does not prove that a codebase has serious debt. Look for recurring patterns and their impact.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Sign&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;th&gt;What to do&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Same files changed repeatedly&lt;/td&gt;
&lt;td&gt;Fixes may be addressing symptoms rather than causes.&lt;/td&gt;
&lt;td&gt;Review file history and investigate recurring changes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Logic duplicated across files&lt;/td&gt;
&lt;td&gt;Copies can drift and behave differently.&lt;/td&gt;
&lt;td&gt;Consider shared middleware, helpers, or services.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Growing conditionals&lt;/td&gt;
&lt;td&gt;Complex branching is harder to understand and test.&lt;/td&gt;
&lt;td&gt;Clarify rules and consider a suitable policy or role-based approach.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dependency sprawl&lt;/td&gt;
&lt;td&gt;Overlapping libraries add maintenance overhead.&lt;/td&gt;
&lt;td&gt;Check existing dependencies before adding another.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mixed architecture patterns&lt;/td&gt;
&lt;td&gt;Inconsistent approaches make the codebase harder to understand.&lt;/td&gt;
&lt;td&gt;Document and follow suitable project patterns.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tests changed to pass code&lt;/td&gt;
&lt;td&gt;Test changes can hide defects if expectations are weakened.&lt;/td&gt;
&lt;td&gt;Change tests only when requirements or expected behavior change.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Code with unclear purpose&lt;/td&gt;
&lt;td&gt;Unknown dependencies make changes risky.&lt;/td&gt;
&lt;td&gt;Trace the reason for the code and document important decisions.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  1. You keep changing the same files
&lt;/h3&gt;

&lt;p&gt;Check your Git history. If the same files appear repeatedly in commits during a sprint, you may be patching symptoms instead of solving the underlying problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do:&lt;/strong&gt; Review the changes together. Are they all fixing different symptoms of the same design issue? Treat repeated changes as a signal to investigate, not as a fixed numerical threshold.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The same logic exists in multiple places
&lt;/h3&gt;

&lt;p&gt;Authentication logic may appear separately in &lt;strong&gt;users.js&lt;/strong&gt;, &lt;strong&gt;posts.js&lt;/strong&gt;, and &lt;strong&gt;comments.js&lt;/strong&gt;, with slightly different implementations. When the rule changes, every copy needs to be updated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do:&lt;/strong&gt; Identify genuinely shared behavior and consider extracting it into middleware, a helper, or a service. Avoid creating an abstraction when the code only looks similar but serves different purposes.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Conditionals keep growing
&lt;/h3&gt;

&lt;p&gt;Nested conditions can accumulate for administrators, moderators, premium users, guests, and other special cases. As the logic grows, it becomes harder to understand which rules apply and how they interact.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do:&lt;/strong&gt; Clarify the business rules first. Consider role-based access control (RBAC) when permissions are organized around roles, or a policy-based approach when access depends on more detailed conditions. Choose an approach that fits the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Dependencies pile up
&lt;/h3&gt;

&lt;p&gt;An AI assistant may suggest a new library without knowing that the project already has a dependency for the same purpose. A codebase might gradually include multiple utility or date-handling libraries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do:&lt;/strong&gt; Check whether an existing dependency or built-in capability already meets the requirement. Consider maintenance status, compatibility, security, and bundle-size impact where relevant before adding another package.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Architecture is all over the place
&lt;/h3&gt;

&lt;p&gt;One part of an application may use MVC, another may use functional handlers, and another may introduce classes for similar responsibilities. Data access may also vary without a clear reason.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do:&lt;/strong&gt; Document the patterns the team wants to follow, including routing, data access, authentication, error handling, and testing. Share relevant guidance when prompting AI assistants.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Tests get changed to make code pass
&lt;/h3&gt;

&lt;p&gt;Imagine a test expects verified to be true. It fails, and an AI assistant changes the expectation to false. The test now passes, but the implementation may still be wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do:&lt;/strong&gt; Understand why the test failed before changing it. Fix the implementation when it does not meet the requirement. Change a test when expected behavior has genuinely changed, not just to make a failing test pass.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Nobody knows why code exists
&lt;/h3&gt;

&lt;p&gt;Comments such as “Not sure if needed” or “Don’t remove, breaks prod” are warning signs when they do not explain the reason behind the code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to do:&lt;/strong&gt; Trace the code to the requirement or decision that introduced it. Document important constraints and why a particular approach was chosen. Confirm that code is no longer needed before removing it.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical audit: Follow one feature across its changes
&lt;/h2&gt;

&lt;p&gt;A useful way to find AI-related technical debt is to audit one feature rather than asking an assistant to review the entire repository and accepting a long list of generic suggestions.&lt;/p&gt;

&lt;p&gt;For example, choose the profile endpoint from the earlier code sample. Review the feature in this order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Trace the change history:&lt;/strong&gt; Use &lt;strong&gt;&lt;code&gt;git log --oneline -- path/to/profile-file.js&lt;/code&gt;&lt;/strong&gt; to see commits that changed the file. Open the relevant diffs and identify which requirements led to each change.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Map the responsibilities:&lt;/strong&gt; List what the endpoint currently handles: token validation, permission checks, rate limiting, logging, database access, and response formatting.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Find duplicated behavior:&lt;/strong&gt; Search for other endpoints that implement the same authentication or rate-limiting rules. Compare the behavior, not just the names of the functions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Check the tests:&lt;/strong&gt; Find tests for valid tokens, missing or invalid tokens, rate limits, missing users, and unexpected database errors. Confirm that the tests reflect the intended behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review dependencies and assumptions:&lt;/strong&gt; Check whether the endpoint uses existing project services and conventions. Identify any new package or special-case rule that needs justification.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Record findings before changing code:&lt;/strong&gt; Separate confirmed defects from maintainability concerns and possible improvements.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A simple audit note could look like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Finding&lt;/th&gt;
&lt;th&gt;Evidence to collect&lt;/th&gt;
&lt;th&gt;Suggested next step&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Authentication repeated in several routes&lt;/td&gt;
&lt;td&gt;Compare route handlers and middleware&lt;/td&gt;
&lt;td&gt;Consolidate only if the behavior and security requirements match.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rate limiting mixed with profile logic&lt;/td&gt;
&lt;td&gt;Trace the endpoint and its tests&lt;/td&gt;
&lt;td&gt;Move rate limiting into dedicated middleware or a service.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Admin exception is unclear&lt;/td&gt;
&lt;td&gt;Find the requirement and authorization rule&lt;/td&gt;
&lt;td&gt;Confirm the rule with the product or security owner before changing it.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Missing failure-path tests&lt;/td&gt;
&lt;td&gt;Review existing test cases&lt;/td&gt;
&lt;td&gt;Add tests for invalid tokens, rate limits, and missing users.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is where the audit becomes more valuable than a generic code review: every finding is tied to a specific file, behavior, or requirement. Do not refactor solely because an AI tool labels something as complex. First confirm that the issue exists and that the proposed change preserves the required behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why AI-assisted development can accumulate debt
&lt;/h2&gt;

&lt;p&gt;AI coding assistants can generate useful local changes, but they may not always account for the whole system. Several factors contribute to this risk:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Incomplete context:&lt;/strong&gt; An assistant may not have access to every relevant file, architectural decision, or business rule. Even when it can inspect a repository, it may not understand why an existing pattern was chosen.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Local task focus:&lt;/strong&gt; A generated change may address the prompt without considering every system-wide effect. Developers still need to review maintainability, consistency, and integration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Limited continuity:&lt;/strong&gt; Context can vary by tool, configuration, and session. Without project-level guidance, later suggestions may not follow earlier decisions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Patches hide root causes:&lt;/strong&gt; When a patch fixes an immediate symptom, the underlying design issue may remain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fast iteration:&lt;/strong&gt; AI makes code generation faster. If review and refactoring do not receive enough attention, changes can accumulate faster than the team can evaluate them.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The lesson is not that AI-generated code is inherently worse than human-written code. Both need review. The important question is whether each change meets the same standards for correctness, security, consistency, and maintainability.&lt;/p&gt;

&lt;h2&gt;
  
  
  A six-step approach to stop the patchwork
&lt;/h2&gt;

&lt;p&gt;Use this approach when a change touches an area that has become difficult to maintain.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: PAUSE
&lt;/h3&gt;

&lt;p&gt;Stop coding and step back. Ask yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Am I solving the right problem?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is this a band-aid for a bigger issue?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Have I changed this area repeatedly?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Did the AI assistant have the architectural context needed for this change?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 2: INSPECT
&lt;/h3&gt;

&lt;p&gt;Open your Git diff and review the recent history of the files you changed. Then ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Do I understand every important line that was added?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is the change consistent with the rest of the codebase?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Would I approve this implementation in a code review?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does it solve the underlying problem or only address a symptom?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 3: TEST
&lt;/h3&gt;

&lt;p&gt;Check whether tests cover the changed behavior:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What about edge cases?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does error handling work as expected?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What happens with missing, invalid, or unexpected input?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Could this change affect another part of the application?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can ask AI to suggest missing test cases, but review those suggestions against the actual requirements. Tests should verify expected behavior, not simply make the implementation pass.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: REFACTOR
&lt;/h3&gt;

&lt;p&gt;Improve the structure where necessary:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Pull genuinely duplicated code into shared functions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Simplify deeply nested conditionals.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Group related responsibilities together.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Simplify unnecessarily complex function signatures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove unused code or dependencies only after confirming they are not needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add comments that explain important decisions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ask AI to suggest a behavior-preserving refactor and explain the proposed changes. Review the result and run relevant tests before accepting it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: DOCUMENT
&lt;/h3&gt;

&lt;p&gt;Write down why a decision was made, not just what the code does. For example, explain why the team chose a simple discount implementation instead of introducing a rule-engine library, and what future change would justify revisiting that decision.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: CONTINUE
&lt;/h3&gt;

&lt;p&gt;Once the change is reviewed, tested, and easier to maintain, continue building. The goal is to address complexity before it becomes expensive to manage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Should you patch, refactor, or rebuild?
&lt;/h2&gt;

&lt;p&gt;Not every issue needs a large refactor. Choose the smallest change that safely addresses the underlying problem.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Situation&lt;/th&gt;
&lt;th&gt;Better next step&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A small, isolated defect with a clear cause&lt;/td&gt;
&lt;td&gt;Patch&lt;/td&gt;
&lt;td&gt;A focused fix is appropriate when it does not add another workaround or break an established pattern.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The same logic is repeated or responsibilities are mixed&lt;/td&gt;
&lt;td&gt;Refactor&lt;/td&gt;
&lt;td&gt;Improve the structure while preserving the required behavior.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Several features depend on an unclear or unsuitable design&lt;/td&gt;
&lt;td&gt;Assess a broader redesign&lt;/td&gt;
&lt;td&gt;First map dependencies, risks, migration effort, and a safe transition path.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A prototype is not yet production code&lt;/td&gt;
&lt;td&gt;Keep it lightweight, but set a review point&lt;/td&gt;
&lt;td&gt;Avoid premature architecture, but do not let experimental code become production code without review.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A rebuild should not be the automatic response to a messy codebase. It can introduce new risks and may recreate the same problems if the underlying requirements and design decisions are not addressed. Prefer incremental refactoring when it can safely improve the system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Team practices for AI-assisted development
&lt;/h2&gt;

&lt;p&gt;Technical debt is also a team concern. Shared practices help keep generated code consistent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Share architecture guidance:&lt;/strong&gt; Document the project’s routing, data access, authentication, error-handling, and testing conventions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Maintain reviewed prompts:&lt;/strong&gt; Keep useful prompts for common tasks, but update them when project patterns change.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review high-impact changes carefully:&lt;/strong&gt; Give additional attention to authentication, authorization, data access, and new dependencies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use AI as a review aid:&lt;/strong&gt; Ask it to identify edge cases, duplication, and possible inconsistencies. Developers remain responsible for verifying the findings.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick audit checklist
&lt;/h2&gt;

&lt;p&gt;Use these questions during a code review or maintenance session:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Is the same logic implemented in multiple files?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Are some files repeatedly changed to address related issues?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Are there several different ways to handle the same operation, such as authentication, logging, or validation?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Are multiple libraries being used for essentially the same purpose?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is important conditional logic deeply nested or difficult to follow?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Are there comments such as “Don’t touch this” without an explanation?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Does the team struggle to explain why an important piece of code exists?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use the answers to identify areas for investigation, not to produce a formal technical-debt score. Prioritize findings by their impact on security, correctness, maintainability, and the effort required to fix them.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI prompt template: Architecture-first approach
&lt;/h2&gt;

&lt;p&gt;Use this template to give an AI assistant context before asking it to implement a change.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TASK: [Describe what you want to build or change.]

PROJECT CONTEXT:
[Relevant files, architecture, existing patterns, and constraints.]

PATTERNS:
[Authentication, logging, data access, error handling, and testing conventions.]

CONSTRAINTS:
- Reuse existing abstractions where appropriate.
- Avoid unnecessary dependencies.
- Preserve existing behavior unless requirements say otherwise.
- Include relevant tests.
- Explain assumptions and trade-offs.

BEFORE IMPLEMENTING:
1. Identify relevant existing code.
2. Explain which patterns or abstractions can be reused.
3. Identify possible edge cases and risks.
4. Present an implementation plan.

THEN:
Implement the approved approach and summarize the changes and tests.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Review the proposed plan and generated code before using them. Providing context improves the quality of the discussion, but it does not guarantee that generated code is correct.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. What if my codebase is already a patchwork? Is it too late to fix?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Start with the file or feature causing the most maintenance problems. Review its behavior, add or improve tests, extract duplicated logic where appropriate, and clarify its responsibilities. Work in manageable steps rather than trying to restructure the entire application at once.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Are there situations where quick AI patches are fine?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. Quick patches can be appropriate for prototypes, throwaway experiments, or low-risk changes when the trade-offs are understood. Before a prototype becomes production code, review its architecture, security, and test coverage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. How do I convince my team to make time for refactoring?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Track examples of repeated bug fixes, slow code reviews, and time spent understanding complex areas. Explain how addressing a specific source of complexity could reduce future maintenance effort. Start with a focused improvement and use the result to demonstrate its value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Does using AI automatically create technical debt?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. AI-generated code can be maintainable when it is reviewed, tested, and aligned with the project’s requirements and architecture. Technical debt can result from human-written code as well. The important factor is how changes are evaluated and maintained.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the speed, lose the patchwork
&lt;/h2&gt;

&lt;p&gt;Vibe coding is not inherently flawed. AI assistants can help developers explore ideas and build features faster. Problems arise when rapid iteration happens without enough attention to architecture, testing, and maintainability.&lt;/p&gt;

&lt;p&gt;The seven warning signs help identify a codebase that is becoming harder to change. The practical audit shows how to trace a concern back to specific code and supporting evidence. The six-step approach helps developers inspect, test, refactor, and document changes, while the patch-or-refactor guide helps determine the right level of response.&lt;/p&gt;

&lt;p&gt;Start with one feature or file that repeatedly causes maintenance work. Trace its history, verify the behavior, and prioritize the issues that have the greatest impact. Use AI to analyze and review code, but keep developers responsible for understanding and approving the changes.&lt;/p&gt;

&lt;p&gt;Build faster with AI while keeping your codebase maintainable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related blogs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/prompt-engineering-vibe-coding" rel="noopener noreferrer"&gt;Prompt Engineering + Vibe Coding: A New Era for Software Developers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/context-engineering-smart-ai-prompts" rel="noopener noreferrer"&gt;Context Engineering: Improving AI Code Output in Your IDE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/rag-vs-fine-tuning-in-gpt-approach" rel="noopener noreferrer"&gt;RAG vs Fine-Tuning: Most Teams Get This Wrong (Here’s the Fix)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/jev-ai-vs-structured-output-llms" rel="noopener noreferrer"&gt;Jev AI vs. Structured-Output LLMs: Which One Should You Actually Use?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>vibecoding</category>
      <category>ai</category>
      <category>development</category>
      <category>promptdrivendevelopment</category>
    </item>
    <item>
      <title>How to Validate PDF Digital Signatures in JavaScript with Timestamps and Long-Term Validation (LTV)</title>
      <dc:creator>Rajeshwari Pandinagarajan</dc:creator>
      <pubDate>Wed, 04 Nov 2026 15:30:00 +0000</pubDate>
      <link>https://dev.to/syncfusion/how-to-validate-pdf-digital-signatures-in-javascript-with-timestamps-and-long-term-validation-ltv-40ne</link>
      <guid>https://dev.to/syncfusion/how-to-validate-pdf-digital-signatures-in-javascript-with-timestamps-and-long-term-validation-ltv-40ne</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; &lt;em&gt;Need to verify signed PDFs long after signing? Learn how to digitally sign PDFs, add trusted timestamps, enable Long-Term Validation (LTV), and validate individual or multiple signatures using the Syncfusion JavaScript PDF Library.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A digital signature helps verify who signed a PDF and whether the document has changed since signing. But how can you validate that signature months or even years later, especially when the signing certificate has expired or revocation information is no longer available?&lt;/p&gt;

&lt;p&gt;Trusted timestamps and Long-Term Validation (LTV) information help preserve the evidence needed for future signature verification.&lt;/p&gt;

&lt;p&gt;With the &lt;a href="https://help.syncfusion.com/common/essential-studio/release-notes/v35.1.37" rel="noopener noreferrer"&gt;2026 Volume 3 release&lt;/a&gt;, Syncfusion® added digital signature validation and Long-Term Validation (LTV) capabilities in its &lt;a href="https://www.syncfusion.com/document-sdk/javascript-pdf-library" rel="noopener noreferrer"&gt;JavaScript PDF Library&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this guide, you’ll learn how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sign PDF documents using a digital certificate.&lt;/li&gt;
&lt;li&gt;Add a trusted timestamp from a Time Stamping Authority (TSA).&lt;/li&gt;
&lt;li&gt;Enable Long-Term Validation (LTV).&lt;/li&gt;
&lt;li&gt;Validate individual and multiple signatures.&lt;/li&gt;
&lt;li&gt;Interpret validation results correctly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; A trusted timestamp and LTV information can help preserve the evidence needed to validate a PDF signature in the future. However, successful long-term validation still depends on the signature’s integrity, the available certificate and revocation evidence, the certificate chain, and the trust policies used by the validating application. LTV improves future validation readiness but does not guarantee indefinite validation under all circumstances.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the new PDF validation capability enables
&lt;/h2&gt;

&lt;p&gt;The new validation capabilities allow developers to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verify whether a signed document has been altered after signing.&lt;/li&gt;
&lt;li&gt;Validate certificate chains used by signatures.&lt;/li&gt;
&lt;li&gt;Inspect trusted timestamp information.&lt;/li&gt;
&lt;li&gt;Check certificate revocation status using OCSP and CRL evidence.&lt;/li&gt;
&lt;li&gt;Validate a specific signature field.&lt;/li&gt;
&lt;li&gt;Validate multiple signatures in a single PDF document.&lt;/li&gt;
&lt;li&gt;Support processes that require long-term signature verification.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These capabilities are especially useful in document management, finance, legal, healthcare, government, and compliance-focused applications where document integrity must be preserved over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Digitally sign a PDF in JavaScript
&lt;/h2&gt;

&lt;p&gt;Digital signatures help verify a PDF document’s authenticity, confirm the identity of the signer, and detect whether the document has been altered after signing. By applying a certificate-based digital signature, you can establish trust in electronic documents and support secure document processing.&lt;/p&gt;

&lt;p&gt;Using the Syncfusion &lt;a href="https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature" rel="noopener noreferrer"&gt;JavaScript PDF Library&lt;/a&gt;, you can digitally sign both newly created and existing PDF documents with industry-standard certificates.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before you begin, ensure you have the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A valid digital certificate (.PFX or .P12) containing the private key.&lt;/li&gt;
&lt;li&gt;The certificate password.&lt;/li&gt;
&lt;li&gt;A PDF document to sign, or a new PDF document to create.&lt;/li&gt;
&lt;li&gt;The Syncfusion JavaScript PDF Library.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Security consideration:&lt;/strong&gt; Never hardcode PFX passwords, private keys, or certificate files in browser-delivered JavaScript. Private keys are sensitive cryptographic assets and should be protected appropriately. For high-security environments, consider server-side signing or a managed digital-signing service rather than exposing signing credentials to client applications.&lt;/p&gt;

&lt;p&gt;Once your certificate and PDF document are ready, you can sign the document by creating a signature field, applying a digital signature, and saving the signed PDF.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps to digitally sign a PDF
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Step 1: Create or load a PDF document
&lt;/h4&gt;

&lt;p&gt;Create a new document or load an existing PDF, depending on your use case. The document acts as the container for the digital signature and related form fields.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2: Create a signature field
&lt;/h4&gt;

&lt;p&gt;Add a &lt;a href="https://ej2.syncfusion.com/documentation/api/pdf/pdfsignaturefield" rel="noopener noreferrer"&gt;PdfSignatureField&lt;/a&gt; to the document. This field defines where the signature information will be stored and displayed within the PDF.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3: Create and apply a digital signature
&lt;/h4&gt;

&lt;p&gt;Load the PFX certificate and create a &lt;a href="https://ej2.syncfusion.com/documentation/api/pdf/pdfsignature" rel="noopener noreferrer"&gt;PdfSignature&lt;/a&gt; object using the certificate and password. You can also specify the cryptographic standard and hashing algorithm used to generate the signature.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 4: Add the signature field and save the document
&lt;/h4&gt;

&lt;p&gt;After applying the signature, add the signature field to the PDF form and save the document. The resulting PDF contains a verifiable digital signature that can later be validated for integrity and authenticity.&lt;/p&gt;

&lt;p&gt;The following example creates a new PDF document, adds a signature field, and applies a digital signature using a PFX certificate and the SHA-256 hashing algorithm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Create the document&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;ej&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;PdfDocument&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// Get the first page of the document&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addPage&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// Access the PDF form&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;form&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Create a new signature field&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;field&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;ej&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;PdfSignatureField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Signature&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// Create a new signature using PFX data and private key&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;sign&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ej&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PdfSignature&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;certData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;cryptographicStandard&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ej&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CryptographicStandard&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cms&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;digestAlgorithm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ej&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DigestAlgorithm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sha256&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// Set the signature to the field&lt;/span&gt;
&lt;span class="nx"&gt;field&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setSignature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sign&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Add the field to the PDF form&lt;/span&gt;
&lt;span class="nx"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;field&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Draw the logo in the signature appearance &lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;signatureAppearance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;field&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAppearance&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; 
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;signatureImage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;PdfBitmap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;logo&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="nx"&gt;signatureAppearance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;normal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;graphics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drawImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;signatureImage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
    &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt; 
&lt;span class="p"&gt;});&lt;/span&gt; 
&lt;span class="c1"&gt;// Save the document&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;output.pdf&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Destroy the document&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3f33fdl42vpivdcybrlq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3f33fdl42vpivdcybrlq.png" alt="Adding a digital signature to a PDF" width="800" height="410"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Adding a digital signature to a PDF&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; In this example, &lt;strong&gt;certData&lt;/strong&gt; represents the PFX certificate bytes and &lt;strong&gt;password&lt;/strong&gt; is the certificate password. These values should be securely loaded through your application’s credential management process rather than embedded directly in source code.&lt;/p&gt;

&lt;p&gt;For additional signing scenarios, including signing existing PDFs and advanced signature configuration options, explore the &lt;a href="https://document.syncfusion.com/demos/document-library/javascript/#/tailwind3/pdf/digitalSignature.html" rel="noopener noreferrer"&gt;digital signature demo&lt;/a&gt; and refer to the &lt;a href="https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature?cs-save-lang=1&amp;amp;cs-tab-name=JavaScript&amp;amp;cs-lang=js#add-a-digital-signature-to-a-new-document" rel="noopener noreferrer"&gt;API documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Add a trusted timestamp to a PDF signature
&lt;/h2&gt;

&lt;p&gt;A timestamp records when a document was signed through a trusted Time Stamping Authority (TSA). It provides evidence of the signing time and helps support future signature verification.&lt;/p&gt;

&lt;p&gt;To add a timestamp, provide a timestamp callback when creating the digital signature. The callback returns the TSA response, which is embedded into the signature during the save operation.&lt;/p&gt;

&lt;p&gt;The following example shows how to add a timestamp to a digitally signed PDF document.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Create a timestamp callback&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;timestampCallback&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Implement timestamp response logic here&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;response&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt; &lt;span class="c1"&gt;// Placeholder return&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;// Create a new signature using PFX data, private key and callback function for timestamp&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;signature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ej&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PdfSignature&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;certData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;cryptographicStandard&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ej&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CryptographicStandard&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cms&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;digestAlgorithm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ej&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DigestAlgorithm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sha256&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="nx"&gt;timestampCallback&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;field&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setSignature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;signature&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Save the document&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;saveAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;output.pdf&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ig0vfjqlvmo7zppfq2h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6ig0vfjqlvmo7zppfq2h.png" alt="Adding a timestamp to a digitally signed PDF document" width="799" height="429"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Adding a timestamp to a digitally signed PDF document&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This example demonstrates the callback contract only. Your application must send the timestamp request to a trusted Time Stamping Authority (TSA) and return the TSA response bytes.&lt;/p&gt;
&lt;h3&gt;
  
  
  Why use saveAsync()?
&lt;/h3&gt;

&lt;p&gt;When timestamping is enabled, the library must communicate with an external TSA service. Because the operation is asynchronous, use &lt;strong&gt;await document.saveAsync()&lt;/strong&gt; to ensure that the timestamp response is received and embedded before the PDF is generated.&lt;/p&gt;

&lt;p&gt;For a complete timestamp integration example, refer to the &lt;a href="https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature?cs-save-lang=1&amp;amp;cs-tab-name=JavaScript&amp;amp;cs-lang=js#adding-a-timestamp-in-digital-signature" rel="noopener noreferrer"&gt;digital signature documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Enhance PDF signature validation with Long-Term Validation (LTV)
&lt;/h2&gt;

&lt;p&gt;A trusted timestamp helps establish when a document was signed, but long-term verification often requires additional evidence. If certificate revocation services become unavailable, validators may not be able to retrieve the information needed to determine whether the signing certificate was trusted at the time of signing.&lt;/p&gt;

&lt;p&gt;Long-Term Validation (LTV) helps address this challenge by embedding certificate and revocation information directly into the PDF.&lt;/p&gt;

&lt;p&gt;To enable LTV:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sign and save the PDF.&lt;/li&gt;
&lt;li&gt;Reload the signed document.&lt;/li&gt;
&lt;li&gt;Retrieve the signature.&lt;/li&gt;
&lt;li&gt;Call the enableLTV() method and provide revocation responses through the callback.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The following code example demonstrates how to enable LTV for a signed PDF document.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Load the signed PDF document&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;ej&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;PdfDocument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Get the signature field&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;field&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fieldAt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Retrieve the PDF signature&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;signature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;field&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getSignature&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// Retrieve the OCSP or CRL response requested by the library&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;longTermValidationCallback&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;requestBytes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Send requestBytes to the approved URL and return the actual response bytes&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;response&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;revocationResponse&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="c1"&gt;// Enable LTV for the created signature&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;ltvEnabled&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;signature&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;enableLTV&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;longTermValidationCallback&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Save the LTV-enabled PDF document&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;output.pdf&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This callback must return the actual OCSP or CRL response bytes requested by the library. Network communication, authentication, retry logic, and error handling should be implemented by your application.&lt;/p&gt;

&lt;p&gt;After you enable LTV, the PDF contains additional validation information that can support future verification and archival processes.&lt;/p&gt;

&lt;p&gt;For complete LTV examples and implementation guidance, refer to the &lt;a href="https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature?cs-save-lang=1&amp;amp;cs-tab-name=JavaScript&amp;amp;cs-lang=js#long-term-validation-ltv" rel="noopener noreferrer"&gt;LTV documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Validate PDF signatures
&lt;/h2&gt;

&lt;p&gt;Once a signed PDF contains timestamp and optional LTV information, the next step is validation. Validation helps determine whether the document has been modified after signing and whether the associated certificates, timestamps, and revocation information remain trustworthy.&lt;/p&gt;

&lt;p&gt;The Syncfusion JavaScript PDF Library supports validation for both individual signatures and multiple signatures contained within a PDF document.&lt;/p&gt;

&lt;p&gt;During validation, the library can verify document modifications, certificate chains, timestamp information, revocation status through OCSP or CRL data, and multiple signatures available in the document.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7uyq44t3qxxangupzzp7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7uyq44t3qxxangupzzp7.png" alt="Validating PDF signatures" width="800" height="305"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Validating PDF signatures using the Syncfusion JavaScript PDF Library&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Validation prerequisites
&lt;/h3&gt;

&lt;p&gt;Before validating signatures, prepare the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;documentData:&lt;/strong&gt; The PDF document bytes to validate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;certificateData:&lt;/strong&gt; Trusted root or intermediate certificate data used to establish trust.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;passwords:&lt;/strong&gt; Optional passwords used only when validating encrypted PDFs or password-protected processes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Providing a certificate does not automatically establish trust. Validation depends on whether a complete and trusted certificate chain can be successfully built according to your organization’s trust requirements.&lt;/p&gt;
&lt;h3&gt;
  
  
  Validate a single signature
&lt;/h3&gt;

&lt;p&gt;To validate an individual signature, retrieve the associated signature field and call the &lt;strong&gt;validateSignature()&lt;/strong&gt; method. The validation process checks whether the document has been modified after signing and evaluates certificate trust, timestamp validity, and revocation status based on the specified validation options.&lt;/p&gt;

&lt;p&gt;The following example validates a single signature using trusted certificate information:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Load the signed PDF document.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;ej&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;PdfDocument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;documentData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Get the first signature field from the form.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;field&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fieldAt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Configure the signature validation options.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;trustedCertificates&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;certificateData&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;passwords&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;syncfusion&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="c1"&gt;// Validate the signature.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;validationResult&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;field&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;validateSignature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Check the validation result.&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Signature name: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;validationResult&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;signatureName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Signature valid: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;validationResult&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isSignatureValid&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Signature status: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;validationResult&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;signatureStatus&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Document modified: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;validationResult&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isDocumentModified&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Revocation result: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;validationResult&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;revocationResult&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Destroy the document and release its resources.&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nc"&gt;Destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The returned validation result contains details about signature validity, document integrity, certificate-chain validation, timestamp verification, and revocation checks.&lt;/p&gt;

&lt;p&gt;Include the passwords option only when validating encrypted PDFs or processes that require password-protected content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Explore the &lt;a href="https://document.syncfusion.com/demos/document-library/javascript/#/tailwind3/pdf/digital-signature-validation.html" rel="noopener noreferrer"&gt;digital signature validation demo&lt;/a&gt; to see the validation process in action and review the validation results returned by the &lt;a href="https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature#digital-signature-validation" rel="noopener noreferrer"&gt;API&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Validate multiple signatures in a PDF
&lt;/h3&gt;

&lt;p&gt;When a PDF contains multiple signatures, validate them collectively using the &lt;strong&gt;validateSignatures()&lt;/strong&gt; method. The method evaluates every signature field in the document and returns both overall and signature-specific validation results.&lt;/p&gt;

&lt;p&gt;The following example validates all signatures in a PDF document:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Load the PDF document that contains multiple signatures.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;ej&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pdf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;PdfDocument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;documentData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Configure the validation options.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;trustedCertificates&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;certificateData&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;passwords&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;syncfusion&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="c1"&gt;// Validate all signatures in the PDF document.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;validationResult&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;validateSignatures&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;validationResult&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
    &lt;span class="nx"&gt;validationResult&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Number of validated signatures: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
        &lt;span class="nx"&gt;validationResult&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;validationResult&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;signatureName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isSignatureValid&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
        &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;// Determine whether all signatures are valid.&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;validationResult&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isValid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;All signatures in the PDF document are valid.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;One or more signatures in the PDF document are invalid.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;strong&gt;validationResult.isValid&lt;/strong&gt; property indicates the overall validation outcome for the document. Review the entries in &lt;strong&gt;validationResult.results&lt;/strong&gt; to inspect the status of each individual signature.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; For additional validation scenarios, review the digital signature validation &lt;a href="https://document.syncfusion.com/demos/document-library/javascript/#/tailwind3/pdf/digital-signature-validation.html" rel="noopener noreferrer"&gt;demo&lt;/a&gt; and &lt;a href="https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature#digital-signature-validation" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;. They include examples covering certificate validation, revocation checking, timestamp verification, and multi-signature validation processes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding validation results
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;validationResult.isValid&lt;/strong&gt; property represents the overall validation outcome based on the validation options you supplied.&lt;/p&gt;

&lt;p&gt;However, developers should also review the individual entries in &lt;strong&gt;validationResult.results&lt;/strong&gt;, since each signature may have different validation outcomes for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Certificate trust.&lt;/li&gt;
&lt;li&gt;Timestamp verification.&lt;/li&gt;
&lt;li&gt;Revocation status.&lt;/li&gt;
&lt;li&gt;Certificate-chain validation.&lt;/li&gt;
&lt;li&gt;Document integrity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reviewing individual validation results provides a more complete assessment than relying only on a single Boolean value. It also helps you make more informed trust decisions when processing signed PDF documents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build a trusted PDF signing and validation process
&lt;/h2&gt;

&lt;p&gt;Now that we’ve covered signing, timestamping, LTV, and validation individually, let’s see how they fit together in a complete process.&lt;/p&gt;

&lt;p&gt;Creating a trusted PDF process involves more than simply applying a digital signature. To ensure long-term document reliability, follow this recommended sequence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign the PDF to establish document authenticity and integrity.&lt;/li&gt;
&lt;li&gt;Add a trusted timestamp to record when the document was signed.&lt;/li&gt;
&lt;li&gt;Enable LTV to embed revocation information required for future verification.&lt;/li&gt;
&lt;li&gt;Validate the signature before accepting, sharing, or archiving the document.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Following this process helps preserve the evidence needed to validate signed PDF documents after certificate expiration or when external revocation services are unavailable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recommended process
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Step 1:&lt;/strong&gt; Sign the PDF using &lt;a href="https://ej2.syncfusion.com/documentation/api/pdf/pdfsignature" rel="noopener noreferrer"&gt;PdfSignature.create()&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt; Add a timestamp using a TSA callback and &lt;a href="https://ej2.syncfusion.com/documentation/api/pdf/pdfdocument#saveasync" rel="noopener noreferrer"&gt;saveAsync()&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step 3:&lt;/strong&gt; Reload the signed document and enable LTV using &lt;a href="https://ej2.syncfusion.com/documentation/api/pdf/pdfsignature#enableltv" rel="noopener noreferrer"&gt;enableLTV()&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step 4:&lt;/strong&gt; Validate the signature using validateSignature() or &lt;a href="https://ej2.syncfusion.com/documentation/api/pdf/pdfform#validatesignatures" rel="noopener noreferrer"&gt;validateSignatures()&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In production environments, these four stages represent the complete trust lifecycle of a signed PDF document. Each stage adds verification evidence that helps preserve trust beyond the initial signing event.&lt;/p&gt;

&lt;p&gt;By combining these stages, you can build secure and reliable PDF signing processes for contracts, compliance documents, business records, and other long-term digital documents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why is a basic digital signature not enough for long-term PDF trust?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Certificates can expire, and revocation information may not always be available in the future. Without a trusted timestamp and Long-Term Validation (LTV), signature validation may lack the evidence required to verify the document over time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does a signature timestamp prove?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A trusted Time Stamping Authority (TSA) provides evidence of when a document was signed. This timestamp can help establish that the signature existed at a particular time and support verification against the signing certificate’s validity period.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is LTV in PDF digital signatures?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Long-Term Validation (LTV) embeds revocation information, such as OCSP and CRL responses, directly into the PDF. This helps support signature validation even when external revocation services are unavailable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does the JavaScript PDF Library support PDF digital signing?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. The Syncfusion JavaScript PDF Library supports certificate-based digital signatures for both new and existing PDF documents through the &lt;strong&gt;PdfSignature&lt;/strong&gt; and &lt;strong&gt;PdfSignatureField&lt;/strong&gt; classes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can LTV and timestamps be used together?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. You can add a timestamp when creating the digital signature and then enable Long-Term Validation (LTV) after signing to support long-term signature verification.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How are signatures validated with the library?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use &lt;strong&gt;signature.validate()&lt;/strong&gt; to validate an individual signature and &lt;strong&gt;document.form.validateSignatures()&lt;/strong&gt; to validate all signatures in a PDF document.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Digital signatures help verify the authenticity and integrity of PDF documents, but trusted timestamps, Long-Term Validation (LTV), and signature validation are essential for maintaining trust over time.&lt;/p&gt;

&lt;p&gt;In this blog, we explored how to sign PDFs in JavaScript, add trusted timestamps, enable LTV, and validate digital signatures using the Syncfusion &lt;a href="https://www.syncfusion.com/document-sdk/javascript-pdf-library" rel="noopener noreferrer"&gt;JavaScript PDF Library&lt;/a&gt;. By combining these capabilities, you can build secure PDF processes that remain verifiable long after documents are signed.&lt;/p&gt;

&lt;p&gt;Ready to get started? Explore the Syncfusion JavaScript PDF Library and add &lt;a href="https://help.syncfusion.com/document-processing/pdf/pdf-library/javascript/digitalsignature" rel="noopener noreferrer"&gt;digital signing and validation capabilities&lt;/a&gt; to your applications.&lt;/p&gt;

&lt;p&gt;If you’re an existing Syncfusion user, download the latest version from the &lt;a href="https://www.syncfusion.com/account/downloads" rel="noopener noreferrer"&gt;license and downloads&lt;/a&gt; page. New users can start with a &lt;a href="https://www.syncfusion.com/downloads" rel="noopener noreferrer"&gt;free 30-day trial&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For questions or assistance, reach out through the &lt;a href="https://www.syncfusion.com/forums" rel="noopener noreferrer"&gt;support forum&lt;/a&gt;, &lt;a href="https://support.syncfusion.com/" rel="noopener noreferrer"&gt;support portal&lt;/a&gt;, or &lt;a href="https://www.syncfusion.com/feedback" rel="noopener noreferrer"&gt;feedback portal&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related blogs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/pades-digital-signature-dotnet" rel="noopener noreferrer"&gt;How to Implement PAdES Digital Signatures in .NET for Long-Term PDF Validation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/add-in-app-digital-sign-wpf-pdf-viewer" rel="noopener noreferrer"&gt;Add Digital Signatures to a WPF PDF Viewer with a Click-to-Place eSign Workflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/syncfusion-pdf-library-vs-aspose-pdf" rel="noopener noreferrer"&gt;Syncfusion PDF Library vs Aspose.PDF: Comparing Features, Performance, and Accessibility&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/javascript-pdf-signature" rel="noopener noreferrer"&gt;How to Add and Customize Signature Blocks in PDFs Using JavaScript PDF Viewer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>pdf</category>
      <category>web</category>
      <category>whatsnew</category>
    </item>
    <item>
      <title>TypeScript 7.0 Migration Guide: Performance, Compatibility, and Upgrade Steps</title>
      <dc:creator>Rajeshwari Pandinagarajan</dc:creator>
      <pubDate>Mon, 19 Oct 2026 14:03:35 +0000</pubDate>
      <link>https://dev.to/syncfusion/typescript-70-migration-guide-performance-compatibility-and-upgrade-steps-1aih</link>
      <guid>https://dev.to/syncfusion/typescript-70-migration-guide-performance-compatibility-and-upgrade-steps-1aih</guid>
      <description>&lt;p&gt;&lt;a href="https://www.syncfusion.com/blogs/post/typescript-7-upgrade-guide" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkr13xgihsae9c4i8zvz6.jpg" alt="TypeScript 7.0 Migration Guide: Performance, Compatibility, and Upgrade Steps" width="799" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; &lt;em&gt;TypeScript 7.0 introduces a native compiler written in Go, with Microsoft’s benchmarks reporting 7.7× to 11.9× faster full builds across five selected projects. This guide covers compiler API compatibility, framework and editor support, tsconfig.json changes, and practical benchmarking steps to help you evaluate the upgrade for your project.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Slow TypeScript builds can delay development, particularly in large applications and monorepos. TypeScript 7.0 introduces a native compiler written in &lt;code&gt;Go&lt;/code&gt;, with substantial speed improvements in Microsoft’s published benchmarks.&lt;/p&gt;

&lt;p&gt;However, upgrading involves more than measuring build speed. TypeScript 7.0 changes the compiler implementation, configuration defaults, and language-server tooling, which may affect existing frameworks and development tools.&lt;/p&gt;

&lt;p&gt;This guide explains the performance results, compatibility checks, configuration changes, and benchmarking steps you should complete before upgrading.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What changes in TypeScript 7.0?
&lt;/h2&gt;

&lt;p&gt;The biggest change is the compiler itself. Earlier versions of TypeScript used a compiler written in TypeScript that ran on JavaScript runtimes such as &lt;code&gt;Node.js&lt;/code&gt;. TypeScript 7.0 introduces a native implementation written in &lt;code&gt;Go&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The new implementation combines native execution with parallel processing. This allows the compiler to make better use of modern hardware for tasks such as parsing, type-checking, and generating output.&lt;/p&gt;

&lt;p&gt;Here are the main changes to consider before upgrading.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Area&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;What changes?&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;What should you check?&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Build performance&lt;/td&gt;
&lt;td&gt;Native compilation and parallel processing can reduce build times.&lt;/td&gt;
&lt;td&gt;Benchmark your own project.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compiler API&lt;/td&gt;
&lt;td&gt;TypeScript 7.0 does not include the programmatic compiler API available in TypeScript 6.0.&lt;/td&gt;
&lt;td&gt;Check tools that import TypeScript directly.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Configuration&lt;/td&gt;
&lt;td&gt;TypeScript 6.0 defaults and certain deprecations carry forward.&lt;/td&gt;
&lt;td&gt;Review &lt;code&gt;&lt;strong&gt;tsconfig.json&lt;/strong&gt;&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Framework integrations&lt;/td&gt;
&lt;td&gt;Some integrations still depend on TypeScript 6.0.&lt;/td&gt;
&lt;td&gt;Check your framework's current guidance.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Editor support&lt;/td&gt;
&lt;td&gt;TypeScript 7.0 uses a new language server based on the Language Server Protocol (LSP).&lt;/td&gt;
&lt;td&gt;Test autocomplete, diagnostics, navigation, and refactoring.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JavaScript and &lt;code&gt;&lt;strong&gt;JSDoc&lt;/strong&gt;&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Some legacy options and syntax patterns have changed.&lt;/td&gt;
&lt;td&gt;Test JavaScript projects that rely on &lt;code&gt;&lt;strong&gt;JSDoc&lt;/strong&gt;&lt;/code&gt; type-checking.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For the complete list of changes, refer to &lt;a href="https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/" rel="noopener noreferrer"&gt;Microsoft’s TypeScript 7.0 announcement&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. How much faster is TypeScript 7.0?
&lt;/h2&gt;

&lt;p&gt;Microsoft published the following full-build measurements comparing TypeScript 6.0 and TypeScript 7.0 on selected open-source projects.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Project&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;TypeScript 6.0&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;TypeScript 7.0&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Reported speedup&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VS Code&lt;/td&gt;
&lt;td&gt;125.7 seconds&lt;/td&gt;
&lt;td&gt;10.6 seconds&lt;/td&gt;
&lt;td&gt;11.9×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sentry&lt;/td&gt;
&lt;td&gt;139.8 seconds&lt;/td&gt;
&lt;td&gt;15.7 seconds&lt;/td&gt;
&lt;td&gt;8.9×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bluesky&lt;/td&gt;
&lt;td&gt;24.3 seconds&lt;/td&gt;
&lt;td&gt;2.8 seconds&lt;/td&gt;
&lt;td&gt;8.7×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Playwright&lt;/td&gt;
&lt;td&gt;12.8 seconds&lt;/td&gt;
&lt;td&gt;1.47 seconds&lt;/td&gt;
&lt;td&gt;8.7×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;tldraw&lt;/td&gt;
&lt;td&gt;11.2 seconds&lt;/td&gt;
&lt;td&gt;1.46 seconds&lt;/td&gt;
&lt;td&gt;7.7×&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/" rel="noopener noreferrer"&gt;Microsoft’s TypeScript 7.0 announcement&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;These results show substantial full-build improvements in Microsoft’s selected benchmark projects, along with lower aggregate memory consumption across those builds. However, these are benchmark results and should not be treated as guaranteed improvements for every project, direct measurements of incremental rebuilds, editor responsiveness, or complete application build times. Actual results depend on factors such as project structure, hardware, build configuration, caching, and how much of your development process is spent on TypeScript compilation.&lt;/p&gt;

&lt;h3&gt;
  
  
  When is upgrading worth evaluating?
&lt;/h3&gt;

&lt;p&gt;TypeScript 7.0 is worth testing if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your full builds take a long time.&lt;/li&gt;
&lt;li&gt;Your monorepo contains many interdependent packages.&lt;/li&gt;
&lt;li&gt;Type-checking takes a significant share of your CI time.&lt;/li&gt;
&lt;li&gt;Your editor struggles with a large codebase.&lt;/li&gt;
&lt;li&gt;Developers frequently wait for compilation after making changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your project already builds quickly, the performance benefit may be less important than compatibility and maintenance. Measure your current setup before deciding.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Check compiler API and tooling compatibility
&lt;/h2&gt;

&lt;p&gt;Before upgrading, check whether your project or its dependencies use the TypeScript compiler API.&lt;/p&gt;

&lt;p&gt;TypeScript 7.0 does not currently expose the programmatic compiler API available in TypeScript 6.0. Tools that inspect types, modify abstract syntax trees (ASTs), or perform custom transformations may therefore need to continue using the TypeScript 6.0 compatibility package until a suitable API is available.&lt;/p&gt;

&lt;p&gt;Check for dependencies such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Custom AST transformers.&lt;/li&gt;
&lt;li&gt;Code-generation tools that inspect TypeScript types.&lt;/li&gt;
&lt;li&gt;Tools that call APIs such as &lt;code&gt;ts.createProgram()&lt;/code&gt; or &lt;code&gt;ts.createLanguageService()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Linters and framework integrations that depend on the compiler API.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your project only uses the standard &lt;code&gt;tsc&lt;/code&gt; command and its dependencies support TypeScript 7.0, migration may be simpler. Projects that rely on the compiler API need additional compatibility checks before switching.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How to check your dependencies&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Start by searching your source files for direct TypeScript imports.&lt;/p&gt;

&lt;p&gt;For example, on a system with grep, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-RIn&lt;/span&gt; &lt;span class="nt"&gt;--include&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'*.ts'&lt;/span&gt; &lt;span class="nt"&gt;--include&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'*.js'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="s1"&gt;'from "typescript"'&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check for &lt;code&gt;CommonJS&lt;/code&gt; imports separately:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-RIn&lt;/span&gt; &lt;span class="nt"&gt;--include&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'*.ts'&lt;/span&gt; &lt;span class="nt"&gt;--include&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'*.js'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="s2"&gt;"require('typescript')"&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also search for common compiler API calls:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-RIn&lt;/span&gt; &lt;span class="nt"&gt;--include&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'*.ts'&lt;/span&gt; &lt;span class="nt"&gt;--include&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'*.js'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="s1"&gt;'ts\.createProgram|ts\.createLanguageService|ts\.getCompilerOptions'&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These commands are a starting point, not a complete dependency audit. They may miss different quote styles, dynamic imports, other file extensions, and dependencies inside installed packages.&lt;/p&gt;

&lt;p&gt;For npm projects, also inspect the installed dependency tree:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;ls &lt;/span&gt;typescript
npm explain typescript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These commands help identify direct and transitive TypeScript dependencies, but you should still verify API usage and compatibility with each tool’s documentation.&lt;/p&gt;

&lt;p&gt;Also review your &lt;code&gt;package.json&lt;/code&gt;, build scripts, framework plugins, and lint configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which tools should you check?
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tool&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;What to verify&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Standard &lt;code&gt;&lt;strong&gt;tsc&lt;/strong&gt;&lt;/code&gt; builds&lt;/td&gt;
&lt;td&gt;Confirm that compilation works with TypeScript 7.0.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;typescript-eslint&lt;/td&gt;
&lt;td&gt;Check its currently supported TypeScript version range.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Custom AST transformers&lt;/td&gt;
&lt;td&gt;Verify access to the compiler API they require.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Framework language services&lt;/td&gt;
&lt;td&gt;Follow the framework's compatibility guidance.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Code generators and AST tools&lt;/td&gt;
&lt;td&gt;Test type analysis and generated output.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Editor extensions&lt;/td&gt;
&lt;td&gt;Check diagnostics, navigation, autocomplete, and other required features.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For example, the typescript-eslint dependency guide lists the TypeScript versions it supports. Check the current range before upgrading because support changes over time.&lt;/p&gt;

&lt;p&gt;A tool may appear to work outside its officially supported version range. That does not mean the combination is supported or that future updates will continue to work.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Check framework and editor compatibility
&lt;/h2&gt;

&lt;p&gt;A successful command-line build does not guarantee that your framework tooling or editor will work correctly with TypeScript 7.0.&lt;/p&gt;

&lt;p&gt;Microsoft identifies Vue, MDX, Astro, and Svelte projects, along with specialized Angular template checking, as areas where TypeScript 6.0 compatibility may still be required.&lt;/p&gt;

&lt;p&gt;Before upgrading, verify the supported TypeScript versions for your framework, language service, editor extensions, and build tools.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Standard TypeScript projects:&lt;/strong&gt; Test TypeScript 7.0 if your dependencies are compatible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Angular:&lt;/strong&gt; You may be able to use TypeScript 7.0 for command-line error checking while retaining TypeScript 6.0 for editor or template tooling. Verify your Angular version and setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vue, Astro, Svelte, and MDX:&lt;/strong&gt; Check the framework’s official guidance before switching the full toolchain.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Other frameworks and editors:&lt;/strong&gt; Confirm that the language service and extensions you rely on support your intended setup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;TypeScript 7.0’s new language server uses LSP, which allows editor integrations to communicate with the language service through a standard protocol.&lt;/p&gt;

&lt;p&gt;After upgrading, test the editor features your team relies on, including diagnostics, autocomplete, go-to-definition, and refactoring.&lt;/p&gt;

&lt;p&gt;For current compatibility details, consult &lt;a href="https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/" rel="noopener noreferrer"&gt;Microsoft’s TypeScript 7.0 announcement&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Review your tsconfig.json
&lt;/h2&gt;

&lt;p&gt;TypeScript 7.0 adopts TypeScript 6.0’s defaults and turns certain deprecated options into errors. Projects upgrading directly from TypeScript 5.x may therefore need more preparation than projects already using TypeScript 6.0.&lt;/p&gt;

&lt;p&gt;Review these settings carefully.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Setting&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;What to check&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&lt;strong&gt;strict&lt;/strong&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defaults to &lt;code&gt;&lt;strong&gt;true&lt;/strong&gt;&lt;/code&gt;. Check whether your code is ready for strict type-checking.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&lt;strong&gt;module&lt;/strong&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defaults to &lt;code&gt;&lt;strong&gt;esnext&lt;/strong&gt;&lt;/code&gt;. Verify that it fits your build setup.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&lt;strong&gt;target&lt;/strong&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defaults to the stable &lt;code&gt;&lt;strong&gt;ECMAScript&lt;/strong&gt;&lt;/code&gt; version immediately before &lt;code&gt;&lt;strong&gt;esnext&lt;/strong&gt;&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&lt;strong&gt;types&lt;/strong&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defaults to an empty array. Add the global type packages your project needs.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&lt;strong&gt;rootDir&lt;/strong&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defaults to the project root. Set it explicitly if your source files live in a subdirectory such as &lt;code&gt;&lt;strong&gt;src&lt;/strong&gt;&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&lt;strong&gt;stableTypeOrdering&lt;/strong&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defaults to &lt;code&gt;&lt;strong&gt;true&lt;/strong&gt;&lt;/code&gt; and can no longer be disabled.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&lt;strong&gt;noUncheckedSideEffectImports&lt;/strong&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defaults to &lt;code&gt;&lt;strong&gt;true&lt;/strong&gt;&lt;/code&gt;. Check side-effect imports, including imports used for styles or other assets.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&lt;strong&gt;libReplacement&lt;/strong&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Defaults to &lt;code&gt;&lt;strong&gt;false&lt;/strong&gt;&lt;/code&gt;. Check whether your project depends on the previous behavior.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&lt;strong&gt;baseUrl&lt;/strong&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No longer supported. Update path mappings to work relative to the project root.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&lt;strong&gt;moduleResolution&lt;/strong&gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Legacy &lt;code&gt;&lt;strong&gt;node/node10&lt;/strong&gt;&lt;/code&gt; and classic modes are no longer supported. Review whether &lt;code&gt;&lt;strong&gt;bundler&lt;/strong&gt;&lt;/code&gt; or &lt;code&gt;&lt;strong&gt;nodenext&lt;/strong&gt;&lt;/code&gt; fits your project.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Check global type declarations
&lt;/h3&gt;

&lt;p&gt;The types default can affect projects that rely on global declarations from packages such as &lt;code&gt;Node.js&lt;/code&gt; and &lt;code&gt;Jest&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For example, you may need to list the required packages explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compilerOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"types"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"node"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"jest"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The exact list depends on your installed type packages and the global declarations your project needs.&lt;/p&gt;

&lt;p&gt;Other deprecated settings also require attention. For example, &lt;code&gt;target: "es5"&lt;/code&gt; and &lt;code&gt;downlevelIteration&lt;/code&gt; are no longer supported. Review the &lt;a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-6-0.html" rel="noopener noreferrer"&gt;TypeScript 6.0 release notes&lt;/a&gt; and the &lt;a href="https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/" rel="noopener noreferrer"&gt;TypeScript 7.0 announcement&lt;/a&gt; before upgrading.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about JavaScript projects using JSDoc?
&lt;/h3&gt;

&lt;p&gt;TypeScript 7.0 also changes how some legacy JavaScript and &lt;code&gt;JSDoc&lt;/code&gt; patterns are handled.&lt;/p&gt;

&lt;p&gt;If your project uses &lt;code&gt;checkJs&lt;/code&gt;, &lt;code&gt;JSDoc&lt;/code&gt; annotations, or JavaScript files that rely on TypeScript’s type inference, test those files carefully. Compare the diagnostics before and after upgrading, then update unsupported patterns according to the official migration guidance.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Benchmark TypeScript 7.0 in your own repository
&lt;/h2&gt;

&lt;p&gt;The best way to evaluate TypeScript 7.0 is to benchmark it against your current compiler in the same repository and environment.&lt;/p&gt;

&lt;p&gt;Measure three scenarios separately:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clean build:&lt;/strong&gt; Measures compilation without previously generated TypeScript build outputs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incremental rebuild:&lt;/strong&gt; Measures compilation after a representative source-file change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Up-to-date build:&lt;/strong&gt; Measures the time required when no source files have changed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also record peak memory usage and total CI build duration where possible. Keep the hardware, configuration, source changes, and cleanup conditions consistent between compiler versions.&lt;/p&gt;

&lt;p&gt;Remember that an application build may include bundling, minification, and asset processing beyond TypeScript compilation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Record your current baseline
&lt;/h3&gt;

&lt;p&gt;Before upgrading, record:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Current TypeScript version.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Node.js&lt;/code&gt; and &lt;code&gt;package-manager&lt;/code&gt; versions.&lt;/li&gt;
&lt;li&gt;Relevant &lt;code&gt;tsconfig.json&lt;/code&gt; files.&lt;/li&gt;
&lt;li&gt;Clean full-build time.&lt;/li&gt;
&lt;li&gt;Incremental rebuild time after a source change.&lt;/li&gt;
&lt;li&gt;Peak memory usage, if available.&lt;/li&gt;
&lt;li&gt;Total CI build duration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use the same machine or equivalent CI runners for both compiler versions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Measure a clean build
&lt;/h3&gt;

&lt;p&gt;For a project that uses TypeScript project references, start with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clean outputs managed by TypeScript build mode.&lt;/span&gt;
npx tsc &lt;span class="nt"&gt;--build&lt;/span&gt; &lt;span class="nt"&gt;--clean&lt;/span&gt;

&lt;span class="c"&gt;# Measure the clean build.&lt;/span&gt;
&lt;span class="nb"&gt;time &lt;/span&gt;npx tsc &lt;span class="nt"&gt;--build&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure your cleanup process also accounts for any additional generated files or caches used by your project. This command does not necessarily clear every tool’s cache.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Measure an incremental rebuild
&lt;/h3&gt;

&lt;p&gt;After the clean build, make a small, representative change to a TypeScript source file. Then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;time &lt;/span&gt;npx tsc &lt;span class="nt"&gt;--build&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This measures a rebuild after a source change, with the build information from the previous run available. It is more useful for evaluating incremental performance than simply running the build again without changing anything.&lt;/p&gt;

&lt;p&gt;If you run the command once more without making any changes, record that separately as an up-to-date build. Do not treat it as an incremental rebuild after a source change.&lt;/p&gt;

&lt;p&gt;For Windows PowerShell, you can measure a build with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Measure-Command &lt;span class="o"&gt;{&lt;/span&gt; npx tsc &lt;span class="nt"&gt;--build&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repeat the same steps with TypeScript 7.0, using the same source change, repository state, and equivalent cleanup conditions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Measure the complete application build separately
&lt;/h3&gt;

&lt;p&gt;Run your normal application build as another measurement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command may include bundling, minification, asset processing, and other work beyond TypeScript compilation.&lt;/p&gt;

&lt;p&gt;For example, if your full application build takes 60 seconds and TypeScript accounts for 30 seconds, a faster compiler will not eliminate the time spent on the remaining build steps.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Compare the results
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Metric&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Current compiler&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;TypeScript 7.0&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Clean full-build time&lt;/td&gt;
&lt;td&gt;Measure&lt;/td&gt;
&lt;td&gt;Measure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Incremental rebuild after a source change&lt;/td&gt;
&lt;td&gt;Measure&lt;/td&gt;
&lt;td&gt;Measure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Up-to-date build time&lt;/td&gt;
&lt;td&gt;Measure&lt;/td&gt;
&lt;td&gt;Measure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Peak memory usage&lt;/td&gt;
&lt;td&gt;Measure&lt;/td&gt;
&lt;td&gt;Measure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;End-to-end CI duration&lt;/td&gt;
&lt;td&gt;Measure&lt;/td&gt;
&lt;td&gt;Measure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tests and linting&lt;/td&gt;
&lt;td&gt;Record results&lt;/td&gt;
&lt;td&gt;Record results&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Editor and framework behavior&lt;/td&gt;
&lt;td&gt;Evaluate&lt;/td&gt;
&lt;td&gt;Evaluate&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Run the measurements multiple times and report how you compared them, for example, by using the median of several runs. Keep hardware, configuration, source changes, and cache conditions consistent.&lt;/p&gt;

&lt;p&gt;The goal is not to reproduce Microsoft’s benchmark numbers. It is to find out whether TypeScript 7.0 improves the parts of your development process that matter to your team.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Tune concurrency only after measuring
&lt;/h2&gt;

&lt;p&gt;TypeScript 7.0 provides experimental options for adjusting parallel processing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--checkers&lt;/code&gt; controls the number of type-checker workers.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--builders&lt;/code&gt; controls the number of parallel project-reference builders in build mode.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--singleThreaded&lt;/code&gt; disables parallel processing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Increasing concurrency may reduce build time, but it can also increase memory usage. Because project builders and type-checker workers can operate concurrently, their combined resource requirements matter.&lt;/p&gt;

&lt;p&gt;Start with the default settings and benchmark your project first. If tuning is necessary, change one option at a time and compare build time and memory consumption.&lt;/p&gt;

&lt;p&gt;Verify the current behavior of these experimental options in Microsoft’s official guidance before adding them to build scripts.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Run TypeScript 6.0 and 7.0 side by side when needed
&lt;/h2&gt;

&lt;p&gt;Some projects may need TypeScript 7.0 for command-line compilation while retaining TypeScript 6.0 for tools that depend on its compiler API.&lt;/p&gt;

&lt;p&gt;Microsoft provides the &lt;code&gt;@typescript/typescript6&lt;/code&gt; compatibility package for toolchains that still require the TypeScript 6.0 API. This allows teams to evaluate the native compiler without immediately replacing every compiler-dependent tool.&lt;/p&gt;

&lt;p&gt;Microsoft documents an npm alias setup such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"devDependencies"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"@typescript/native"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm:typescript@^7.0.2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"typescript"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm:@typescript/typescript6@^6.0.2"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this setup, &lt;code&gt;@typescript/native&lt;/code&gt; provides the TypeScript 7.0 compiler, while the typescript dependency resolves to the TypeScript 6.0 compatibility package for tools that need its API.&lt;/p&gt;

&lt;p&gt;Use a side-by-side setup only when your project requires it. After configuring the package aliases, verify which compiler each tool loads and test builds, linting, editor integration, and CI.&lt;/p&gt;

&lt;p&gt;Follow Microsoft’s current &lt;a href="https://www.typescriptlang.org/download/" rel="noopener noreferrer"&gt;installation guidance&lt;/a&gt; before applying the configuration to your project.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. TypeScript 7.0 migration checklist
&lt;/h2&gt;

&lt;p&gt;Use this checklist to plan and validate your upgrade.&lt;/p&gt;

&lt;h3&gt;
  
  
  Before upgrading
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Record the current TypeScript version and build performance.&lt;/li&gt;
&lt;li&gt;Audit direct and transitive compiler API dependencies.&lt;/li&gt;
&lt;li&gt;Check framework, editor, linter, and transformer compatibility.&lt;/li&gt;
&lt;li&gt;Review TypeScript 6.0 configuration changes and deprecated options.&lt;/li&gt;
&lt;li&gt;Create a separate branch for migration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  During the upgrade
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Install TypeScript 7.0 using the official package instructions.&lt;/li&gt;
&lt;li&gt;Update unsupported configuration options.&lt;/li&gt;
&lt;li&gt;Run clean builds and incremental rebuilds.&lt;/li&gt;
&lt;li&gt;Run tests, linting, and type-checking.&lt;/li&gt;
&lt;li&gt;Compare generated output and declaration files where relevant.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Before rollout
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Compare build time and memory use against the baseline.&lt;/li&gt;
&lt;li&gt;Verify editor diagnostics, navigation, and autocomplete.&lt;/li&gt;
&lt;li&gt;Test framework-specific templates and language services.&lt;/li&gt;
&lt;li&gt;Validate CI and staging pipelines.&lt;/li&gt;
&lt;li&gt;Document any compatibility workarounds for the team.&lt;/li&gt;
&lt;li&gt;Define rollback criteria and retain the previous compiler configuration in case of compatibility issues, failing tests, or unexpected build regressions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use the checklist alongside the compatibility checks in Sections 3 and 4. Completing the steps helps you identify migration risks before the upgrade reaches your main development environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Should you upgrade to TypeScript 7.0 now?
&lt;/h2&gt;

&lt;p&gt;Your upgrade decision should depend on two factors: compatibility and measurable performance gains.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Your situation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Recommended approach&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Standard CLI compilation, compatible dependencies, and slow builds&lt;/td&gt;
&lt;td&gt;Pilot TypeScript 7.0 and measure the results.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large monorepo with long CI builds&lt;/td&gt;
&lt;td&gt;Benchmark full and incremental builds, and validate project-reference builds.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Project already builds quickly&lt;/td&gt;
&lt;td&gt;Upgrade when there is a clear performance or maintenance benefit.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heavy compiler API usage or custom transformers&lt;/td&gt;
&lt;td&gt;Verify the compatibility path before changing the primary compiler.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vue, Astro, Svelte, MDX, or specialized Angular tooling&lt;/td&gt;
&lt;td&gt;Check framework-specific support before switching the full toolchain.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Production-critical project with limited testing capacity&lt;/td&gt;
&lt;td&gt;Wait until you can verify compatibility in a representative environment.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If your dependencies support TypeScript 7.0 and compilation is slowing down development or CI, start with a pilot migration and compare your results against the current compiler.&lt;/p&gt;

&lt;p&gt;If your project depends on the compiler API or specialized framework tooling, verify the supported migration path first. You may need to retain TypeScript 6.0 for some tools while evaluating TypeScript 7.0 for command-line compilation.&lt;/p&gt;

&lt;p&gt;Upgrade when your own measurements demonstrate a worthwhile benefit and your essential development processes remain compatible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is TypeScript 7.0 faster than TypeScript 6.0?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Microsoft’s published full-build benchmarks show speedups ranging from &lt;code&gt;7.7×&lt;/code&gt; to &lt;code&gt;11.9×&lt;/code&gt; across five selected projects. Your results will depend on your codebase, hardware, build configuration, and caching.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need to change my Node.js setup when upgrading to TypeScript 7.0?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not necessarily. TypeScript 7.0 uses a native Go-based compiler, but &lt;code&gt;Node.js&lt;/code&gt; may still be required for npm, bundlers, test runners, and other JavaScript tools. Review your complete toolchain before changing your environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I use TypeScript 6.0 and TypeScript 7.0 together?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. Microsoft’s &lt;code&gt;@typescript/typescript6&lt;/code&gt; compatibility package allows tools that need the TypeScript 6.0 API to run alongside TypeScript 7.0. However, package resolution and tool compatibility must be tested.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Will my existing tsconfig.json work unchanged?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not necessarily. TypeScript 7.0 adopts TypeScript 6.0 defaults and rejects certain deprecated options. Review the migration notes and test your configuration before upgrading.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should I upgrade immediately?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Start with a pilot if your current build times are a problem and your dependencies appear compatible. If your project depends on specialized framework tooling or the compiler API, verify the supported migration path first.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;TypeScript 7.0 offers substantial performance potential for projects where compilation and type-checking slow down development. However, the benefits depend on your codebase, configuration, and development tools.&lt;/p&gt;

&lt;p&gt;Before switching, benchmark your current development setup, verify compiler API and framework compatibility, and test the upgrade in a separate branch. If the results show meaningful improvements without disrupting your essential tooling, proceed with a controlled rollout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Measure your project’s performance and verify compatibility before making TypeScript 7.0 your default compiler.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>webdev</category>
      <category>performance</category>
      <category>microsoft</category>
    </item>
    <item>
      <title>Building Reliable AI Systems? Explore Our New Context Engineering Handbook</title>
      <dc:creator>Rajeshwari Pandinagarajan</dc:creator>
      <pubDate>Fri, 14 Aug 2026 06:39:10 +0000</pubDate>
      <link>https://dev.to/syncfusion/building-reliable-ai-systems-explore-our-new-context-engineering-handbook-5c18</link>
      <guid>https://dev.to/syncfusion/building-reliable-ai-systems-explore-our-new-context-engineering-handbook-5c18</guid>
      <description>&lt;p&gt;&lt;a href="https://www.syncfusion.com/blogs/post/reliable-ai-context-engineering-book" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7w7768mhm8swwo1bwsj2.jpg" alt="Building Reliable AI Systems? Explore Our New Context Engineering Handbook" width="799" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Why do AI applications fail even with well-crafted prompts? Often, the real problem is a lack of context. The Context Engineering Handbook explores practical techniques for grounding AI with relevant information, helping developers build more accurate, reliable, and production-ready apps.&lt;/p&gt;

&lt;p&gt;As AI applications move from prototypes to production, many teams discover that better prompts alone don’t guarantee better results. Instead, the missing piece is often context.&lt;/p&gt;

&lt;p&gt;An AI assistant can follow instructions perfectly and still fail if it lacks relevant, up-to-date information. That is why context engineering, the practice of providing models with the right information at the right time, has become a critical part of building reliable AI apps.&lt;/p&gt;

&lt;p&gt;We’re excited to introduce the &lt;a href="https://www.syncfusion.com/code-studio/context-engineering" rel="noopener noreferrer"&gt;Context Engineering Handbook&lt;/a&gt;, a practical guide that explores how developers can build AI applications that are more accurate, grounded, cost-efficient, and reliable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why better context often matters more than better prompts
&lt;/h2&gt;

&lt;p&gt;Prompting remains important, but production AI systems also depend on the quality, relevance, and structure of the information available to the model.&lt;/p&gt;

&lt;p&gt;For example, consider a customer support assistant answering questions about a company’s refund policy. Even the best prompt cannot compensate for outdated or missing policy information. The model first needs access to the latest documentation before it can provide a reliable answer.&lt;/p&gt;

&lt;p&gt;This is where context engineering makes a difference by retrieving, organizing, and delivering the right information at the right time.&lt;/p&gt;

&lt;p&gt;Instead of focusing only on instructions, it focuses on the information available to the model when it generates a response. That information may include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Relevant documents and knowledge sources,&lt;/li&gt;
&lt;li&gt;Examples that guide response quality,&lt;/li&gt;
&lt;li&gt;Business rules and operational constraints,&lt;/li&gt;
&lt;li&gt;User-specific information,&lt;/li&gt;
&lt;li&gt;Tool outputs and system state, &lt;/li&gt;
&lt;li&gt;Historical conversation context,&lt;/li&gt;
&lt;li&gt;Conversation summarization,&lt;/li&gt;
&lt;li&gt;Relevance filtering,&lt;/li&gt;
&lt;li&gt;Context compression, and&lt;/li&gt;
&lt;li&gt;Token budget management.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is simple: provide the information that helps the model complete the task successfully while filtering out unnecessary noise.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is context engineering?
&lt;/h2&gt;

&lt;p&gt;At its core, context engineering is the practice of designing, assembling, managing, retrieving, and delivering the information an AI model needs to complete a task reliably.&lt;/p&gt;

&lt;p&gt;Prompt engineering focuses on how you instruct the model. Context engineering focuses on what information is available to the model when it generates a response.&lt;a href="https://www.syncfusion.com/blogs/wp-content/uploads/2026/08/Context-engineering.png" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuwxw4j1s5f1ebszd7117.png" alt="Context engineering" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In practice, this means deciding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which information should be included,&lt;/li&gt;
&lt;li&gt;Which information should be excluded,&lt;/li&gt;
&lt;li&gt;How information should be structured,&lt;/li&gt;
&lt;li&gt;When information should be retrieved, and&lt;/li&gt;
&lt;li&gt;How context should evolve during execution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As AI systems become more sophisticated, these decisions can have as much impact on output quality as prompt wording.&lt;/p&gt;

&lt;p&gt;Here’s the context engineering pipeline:&lt;/p&gt;

&lt;p&gt;User request&lt;br&gt;&lt;br&gt;
     ↓&lt;br&gt;&lt;br&gt;
Retrieve relevant information&lt;br&gt;&lt;br&gt;
     ↓&lt;br&gt;&lt;br&gt;
Filter irrelevant content&lt;br&gt;&lt;br&gt;
     ↓&lt;br&gt;&lt;br&gt;
Rank/prioritize context&lt;br&gt;&lt;br&gt;
     ↓&lt;br&gt;&lt;br&gt;
Add memory + tools + constraints&lt;br&gt;&lt;br&gt;
     ↓&lt;br&gt;&lt;br&gt;
Assemble model context&lt;br&gt;&lt;br&gt;
     ↓&lt;br&gt;&lt;br&gt;
Generate response&lt;br&gt;&lt;br&gt;
     ↓&lt;br&gt;&lt;br&gt;
Validate output&lt;/p&gt;

&lt;h2&gt;
  
  
  Prompt engineering vs. Context engineering vs. RAG
&lt;/h2&gt;

&lt;p&gt;For a better understanding, refer to the following comparison table.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Concepts&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Primary focus&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Prompt engineering&lt;/td&gt;
&lt;td&gt;Instructions and task wording.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context engineering&lt;/td&gt;
&lt;td&gt;Selecting and managing information available to the model.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RAG&lt;/td&gt;
&lt;td&gt;Retrieving external information and injecting relevant results into model context.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Why good context saves hours of debugging
&lt;/h2&gt;

&lt;p&gt;Many production AI issues can be traced back to poor context management.&lt;/p&gt;

&lt;p&gt;When context is weak, teams commonly encounter:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hallucinated answers,&lt;/li&gt;
&lt;li&gt;Inconsistent responses,&lt;/li&gt;
&lt;li&gt;Higher token costs,&lt;/li&gt;
&lt;li&gt;Loss of conversational,&lt;/li&gt;
&lt;li&gt;Difficulty tracing outputs back to source information, and&lt;/li&gt;
&lt;li&gt;Increased risk when interacting with external systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Grounding responses in trusted data makes AI applications easier to verify, debug, and maintain. As a result, developers can trace answers back to the information that influenced them instead of relying on model assumptions.&lt;/p&gt;

&lt;h2&gt;
  
  
  A real-world example: AI coding assistants
&lt;/h2&gt;

&lt;p&gt;The impact becomes even clearer when you look at how AI is being used in modern software development.&lt;/p&gt;

&lt;p&gt;Imagine an AI coding assistant working inside a large enterprise codebase. Without context, it might generate code that compiles successfully but ignores internal APIs, security requirements, or established architecture patterns.&lt;/p&gt;

&lt;p&gt;Now give that assistant access to relevant source files, product requirements, coding standards, architecture documentation, and API contracts. With that context, the generated code becomes far more useful because it reflects how the system is actually built.&lt;/p&gt;

&lt;p&gt;User request&lt;br&gt;&lt;br&gt;
     ↓&lt;br&gt;&lt;br&gt;
Relevant source files&lt;br&gt;&lt;br&gt;
     +&lt;br&gt;&lt;br&gt;
Architecture rules&lt;br&gt;&lt;br&gt;
     +&lt;br&gt;&lt;br&gt;
API contracts&lt;br&gt;&lt;br&gt;
     +&lt;br&gt;&lt;br&gt;
Coding standards&lt;br&gt;&lt;br&gt;
     +&lt;br&gt;&lt;br&gt;
Repository instructions&lt;br&gt;&lt;br&gt;
     ↓&lt;br&gt;&lt;br&gt;
Context selection&lt;br&gt;&lt;br&gt;
     ↓&lt;br&gt;&lt;br&gt;
AI model&lt;br&gt;&lt;br&gt;
     ↓&lt;br&gt;&lt;br&gt;
Generated code&lt;/p&gt;

&lt;p&gt;The prompt hasn’t changed, but the quality of information available to the model has. That’s the value of context engineering in real-world development environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  The difference between a great demo and a production system
&lt;/h2&gt;

&lt;p&gt;Many AI projects start with an impressive demo. A few carefully selected examples work perfectly, and the results look promising.&lt;/p&gt;

&lt;p&gt;Production, however, is different.&lt;/p&gt;

&lt;p&gt;Documentation changes, data grows, business rules evolve, and users ask questions nobody anticipated. As a result, context engineering helps bridge that gap by providing techniques for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Retrieving relevant information dynamically,&lt;/li&gt;
&lt;li&gt;Grounding responses in trusted sources,&lt;/li&gt;
&lt;li&gt;Reducing unnecessary token usage, and&lt;/li&gt;
&lt;li&gt;Maintaining consistency as applications grow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rather than being tied to a specific framework or vendor, these principles apply across modern AI systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you’ll learn about building production AI systems
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Context Engineering Handbook&lt;/strong&gt; focuses on practical techniques that help teams build more dependable AI applications.&lt;/p&gt;

&lt;p&gt;You’ll learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How context affects model accuracy and reliability,&lt;/li&gt;
&lt;li&gt;Practical approaches such as grounding, RAG, memory, and tool integration, along with techniques for controlling model outputs,&lt;/li&gt;
&lt;li&gt;Cost-efficient context strategies, and context optimization techniques,&lt;/li&gt;
&lt;li&gt;Common failure patterns and debugging techniques, and&lt;/li&gt;
&lt;li&gt;Real-world implementation scenarios from prototype to production.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The focus is on practical concepts and implementation patterns that developers can apply immediately.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who should read the Context Engineering Handbook?
&lt;/h2&gt;

&lt;p&gt;This guide is designed for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Developers building AI-powered applications,&lt;/li&gt;
&lt;li&gt;Architects designing scalable AI systems,&lt;/li&gt;
&lt;li&gt;Product teams integrating AI capabilities, and&lt;/li&gt;
&lt;li&gt;Analysts and technical teams managing enterprise knowledge and AI apps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you’re building a coding assistant, an internal knowledge bot, a document-processing solution, or an enterprise AI application, understanding context engineering can significantly improve output quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turning AI prototypes into reliable systems
&lt;/h2&gt;

&lt;p&gt;Many AI resources focus heavily on prompting techniques. While prompting remains valuable, it is only one piece of the puzzle.&lt;/p&gt;

&lt;p&gt;In production, the challenges often involve data freshness, context assembly, retrieval strategies, grounding, traceability, context limits, and long-term reliability.&lt;/p&gt;

&lt;p&gt;This &lt;strong&gt;Context Engineering Handbook&lt;/strong&gt; takes a broader view by showing how context is collected, filtered, structured, retrieved, and maintained throughout an application’s lifecycle. You’ll find practical guidance, implementation patterns, common mistakes, and real-world scenarios that reflect how production AI systems are built in practice.&lt;/p&gt;

&lt;p&gt;If you’re applying these concepts within enterprise development environments, Syncfusion&lt;sup&gt;® &lt;/sup&gt;&lt;a href="https://www.syncfusion.com/code-studio/" rel="noopener noreferrer"&gt;Code Studio&lt;/a&gt; provides tools that help developers bring context-aware AI capabilities into everyday software development.&lt;/p&gt;

&lt;p&gt;Explore the &lt;a href="https://www.syncfusion.com/code-studio/context-engineering" rel="noopener noreferrer"&gt;Context Engineering Handbook&lt;/a&gt; to learn practical techniques for building reliable AI systems and try Syncfusion &lt;a href="https://help.syncfusion.com/code-studio/getting-started/overview" rel="noopener noreferrer"&gt;Code Studio&lt;/a&gt; to accelerate context-aware development.&lt;/p&gt;

&lt;p&gt;For questions or feedback, contact us through our &lt;a href="https://support.syncfusion.com/" rel="noopener noreferrer"&gt;support portal&lt;/a&gt;, &lt;a href="https://www.syncfusion.com/forums" rel="noopener noreferrer"&gt;support forums&lt;/a&gt;, or &lt;a href="https://www.syncfusion.com/feedback" rel="noopener noreferrer"&gt;feedback portal&lt;/a&gt;. We’re always happy to help.&lt;/p&gt;

</description>
      <category>syncfusion</category>
      <category>ai</category>
      <category>codestudio</category>
      <category>contextengineering</category>
    </item>
    <item>
      <title>Build vs. Buy a PDF Viewer: The Real Cost of In-House Development</title>
      <dc:creator>Rajeshwari Pandinagarajan</dc:creator>
      <pubDate>Mon, 03 Aug 2026 10:19:23 +0000</pubDate>
      <link>https://dev.to/syncfusion/build-vs-buy-a-pdf-viewer-the-real-cost-of-in-house-development-317i</link>
      <guid>https://dev.to/syncfusion/build-vs-buy-a-pdf-viewer-the-real-cost-of-in-house-development-317i</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Building a PDF viewer involves far more than rendering documents. Hidden costs emerge through compatibility testing, performance optimization, cross-platform support, security, accessibility, feature expansion, and ongoing maintenance. Learn why evaluating the total cost of ownership (TCO) is critical when deciding between building a PDF viewer in-house or adopting a commercial SDK.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Understanding PDF viewer development cost requires looking beyond rendering and considering the long-term ownership of compatibility, performance, security, testing, and maintenance.&lt;/p&gt;

&lt;p&gt;A prototype that opens PDFs, supports scrolling, and provides zoom controls can often be completed quickly. The real engineering effort begins after deployment, when customers expect accurate rendering across thousands of document variations, smooth performance on large files, annotation workflows, accessibility, security, browser compatibility, and long-term maintenance.&lt;/p&gt;

&lt;p&gt;Before choosing to build a PDF viewer in-house, evaluate its total cost of ownership (TCO) rather than only the initial development effort. For many organizations, maintaining PDF infrastructure becomes a larger investment than building the first version.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The prototype that looked finished&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first version often feels complete.&lt;/p&gt;

&lt;p&gt;A developer loads a PDF, renders pages, adds zoom controls, enables scrolling, and implements page navigation. During testing, everything works as expected.&lt;/p&gt;

&lt;p&gt;Then, real users start uploading documents.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A large engineering drawing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A scanned contract.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A government form with embedded fonts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A multilingual document.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Suddenly, new issues appear:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Why does this PDF render differently across browsers?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Why does performance drop with large files?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Why does text search fail on scanned documents?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Why are annotations misaligned after zooming?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These problems rarely surface during prototype testing because prototypes typically use a limited set of predictable documents.&lt;/p&gt;

&lt;p&gt;Production environments are different. Users bring PDFs created by different tools, workflows, and systems, each with unique formatting and compatibility challenges.&lt;/p&gt;

&lt;p&gt;That’s where the hidden cost of building a PDF viewer begins.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building a PDF viewer isn’t one decision&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the biggest misconceptions is that teams have only two options: build a PDF viewer themselves or buy a commercial SDK.&lt;/p&gt;

&lt;p&gt;In reality, the decision is more nuanced. Some teams rely on a browser’s native PDF viewer, which is quick to implement but offers limited customization and can behave differently across browsers. &lt;/p&gt;

&lt;p&gt;Others use an open-source rendering library, which reduces the effort required to display PDF pages but still leaves the team responsible for building and maintaining many surrounding features. &lt;/p&gt;

&lt;p&gt;At the other end of the spectrum is a fully custom PDF viewer, which provides maximum flexibility but also places the entire burden of development, compatibility, testing, and maintenance on the engineering team. Commercial PDF Viewer SDKs shift much of that foundational work to the vendor, allowing teams to focus on business-specific workflows and integrations.&lt;/p&gt;

&lt;p&gt;Many organizations assume that adopting an open-source rendering library removes the complexity of PDF viewing. In practice, it simply changes what the team owns.&lt;/p&gt;

&lt;p&gt;While the rendering engine may display PDF pages, the application still needs features such as navigation, search, annotations, forms, authentication, accessibility support, browser compatibility handling, performance optimization, testing, and long-term maintenance.&lt;/p&gt;

&lt;p&gt;The licensing cost may disappear, but the engineering cost remains.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The PDF viewer capability ladder&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another reason projects exceed their original estimates is that stakeholders rarely stop at basic viewing.&lt;/p&gt;

&lt;p&gt;What begins as a simple document viewer gradually evolves into a document platform.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Maturity level&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Typical capabilities&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Basic viewer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Open, render, scroll, zoom, navigate.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Usable viewer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Search, thumbnails, bookmarks, hyperlinks, printing.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Collaborative viewer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Highlights, comments, annotations, drawing tools.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Interactive experiences&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Forms, signatures, page organization, redaction.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Enterprise viewer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Authentication, permissions, audit logs, accessibility.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Document platform&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AI-powered search, document extraction, workflow automation, compliance integration.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The engineering effort doesn’t usually increase because the original estimate was inaccurate. It increases because user expectations naturally move up this capability ladder. &lt;/p&gt;

&lt;p&gt;The first estimate often assumes the first row, while production eventually demands the last.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why PDF viewers become more expensive over time&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;1. Rendering is only the beginning&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Rendering the first page of a PDF often feels like the biggest milestone.&lt;/p&gt;

&lt;p&gt;In reality, it’s only the foundation. &lt;/p&gt;

&lt;p&gt;A production-ready PDF viewer is expected to provide a smooth and consistent reading experience regardless of document size, content, or device. Users quickly expect capabilities such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Page thumbnails,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fit-to-page and fit-to-width viewing,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Smooth scrolling and panning,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multiple page layouts,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;High-quality rendering at different zoom levels,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rotation and orientation handling, and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fast navigation through large documents.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each feature introduces additional rendering logic, state management, and user interaction patterns.&lt;/p&gt;

&lt;p&gt;The challenge is no longer simply displaying pages—it’s delivering a viewing experience that feels reliable and responsive under a wide variety of conditions.&lt;/p&gt;

&lt;p&gt;Rendering is not a one-time implementation. Teams often need to continuously optimize memory usage, page loading, zoom behavior, and browser-specific rendering differences as document complexity grows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;2. Real-world PDFs are far more diverse than test documents&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most development teams validate a PDF viewer using a relatively small set of sample files.&lt;/p&gt;

&lt;p&gt;Production environments are very different.&lt;/p&gt;

&lt;p&gt;Customers upload documents generated by dozens of different applications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Microsoft Office,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Adobe Acrobat,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AutoCAD,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ERP systems,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Medical systems,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Banking software,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Government portals, and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Third-party reporting tools.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each generator creates PDFs with subtle differences.&lt;/p&gt;

&lt;p&gt;Production PDFs can contain embedded fonts, scanned content, OCR layers, forms, annotations, bookmarks, security settings, and many other variations that introduce compatibility challenges.&lt;/p&gt;

&lt;p&gt;A document that renders perfectly during internal testing may expose compatibility issues the first time a customer uploads it.&lt;/p&gt;

&lt;p&gt;Over time, supporting document compatibility becomes one of the largest ongoing engineering investments, as every new document variation introduces additional testing and validation requirements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;3. Performance becomes a continuous engineering responsibility&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Small PDFs rarely reveal performance problems. A ten-page invoice loads almost instantly, while a thousand-page engineering specification tells a different story. &lt;/p&gt;

&lt;p&gt;As document sizes grow, rendering, memory consumption, text extraction, search, and scrolling performance become increasingly important to the user experience. Users expect large documents to remain as responsive as small ones, but meeting that expectation requires far more than simply rendering pages.&lt;/p&gt;

&lt;p&gt;As usage grows, teams often need to address slow loading times, memory consumption, rendering delays, zoom lag, scrolling performance, and mobile-device limitations. &lt;/p&gt;

&lt;p&gt;As browsers evolve and document sizes increase, these optimizations must be revisited repeatedly. Performance is therefore not a completed task; it becomes part of the product’s ongoing lifecycle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;4. Features expand faster than expected&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What begins as basic viewing often expands quickly as users request search, annotations, form filling, redaction, and collaboration capabilities.&lt;/p&gt;

&lt;p&gt;What started as a document viewer gradually becomes a document workflow platform. Typical requests include search, bookmarks, annotations, form filling, printing, redaction, and collaboration capabilities. While each request may seem manageable individually, together they transform a simple viewer into a document workflow platform.&lt;/p&gt;

&lt;p&gt;None of these features exist in isolation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Annotations affect printing.&lt;/li&gt;
&lt;li&gt;Printing affects rendering.&lt;/li&gt;
&lt;li&gt;Rendering affects performance.&lt;/li&gt;
&lt;li&gt;Forms interact with accessibility.&lt;/li&gt;
&lt;li&gt;Security affects every workflow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every capability introduces new interactions, testing requirements, and maintenance responsibilities.&lt;/p&gt;

&lt;p&gt;Every new capability increases implementation effort, testing requirements, documentation needs, customer support demands, and long-term maintenance responsibilities.&lt;/p&gt;

&lt;p&gt;Feature growth is rarely linear. It compounds over time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;5. Supporting multiple platforms multiplies engineering effort&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Modern applications rarely target a single environment. Most applications must support multiple browsers, operating systems, desktop environments, tablets, and mobile devices. Ensuring consistent behavior across all these environments significantly increases development and testing effort.&lt;/p&gt;

&lt;p&gt;Users expect identical behavior everywhere, but developers know that reality is much more complicated. Different platforms introduce variations in rendering behavior, font handling, printing, touch interactions, file access, memory limits, and accessibility implementations. &lt;/p&gt;

&lt;p&gt;As a result, a feature that works perfectly in Chrome may require additional work to behave consistently in Safari or on mobile devices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;6. Enterprise requirements extend beyond features&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Many organizations don’t simply need to display PDFs. They build workflows around them. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Legal teams review contracts.&lt;/li&gt;
&lt;li&gt;Healthcare professionals access patient records.&lt;/li&gt;
&lt;li&gt;Banks process financial statements.&lt;/li&gt;
&lt;li&gt;Government agencies manage regulated documents.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enterprise environments often require more than document viewing. Authentication, authorization, role-based permissions, secure document access, audit trails, and accessibility compliance frequently become mandatory before production deployment. These requirements add both implementation and long-term maintenance complexity.&lt;/p&gt;

&lt;p&gt;Accessibility should also be planned from the beginning. Retrofitting keyboard navigation, focus management, accessible controls, and compliance requirements later can require significant redesign effort.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;7. Maintenance quickly becomes the highest cost&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first release is only the beginning. Once a PDF Viewer reaches production, engineering ownership continues for years.&lt;/p&gt;

&lt;p&gt;Maintenance typically includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Browser updates,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Operating system changes,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rendering improvements,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security patches,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compatibility fixes,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance tuning,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Feature enhancements,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Customer support, and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Regression testing.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many teams estimate the effort required to build the first version. Far fewer estimate the effort required to maintain it for the next five years.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The hidden maintenance cycle&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every update triggers another cycle:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fresource-center%2Fwp-content%2Fuploads%2Fsites%2F9%2F2026%2F07%2FThe-Hidden-Maintenance-Cycle-683x1024.jpg" class="article-body-image-wrapper"&gt;&lt;img width="683" height="1024" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fresource-center%2Fwp-content%2Fuploads%2Fsites%2F9%2F2026%2F07%2FThe-Hidden-Maintenance-Cycle-683x1024.jpg" alt="The Hidden Maintenance Cycle"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As long as the application is supported, this maintenance cycle continues. Over time, rendering, compatibility, testing, and maintenance become interconnected responsibilities that require ongoing engineering investment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evaluating the true cost of ownership&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Looking beyond development cost&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the biggest mistakes organizations make when evaluating an in-house PDF Viewer is measuring only the effort required to build the first version.&lt;/p&gt;

&lt;p&gt;Initial implementation is only one milestone in a much longer engineering lifecycle.&lt;/p&gt;

&lt;p&gt;A production-ready PDF viewer continues to evolve as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Application requirements change,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Browsers introduce new rendering behavior,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Operating systems evolve,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Accessibility standards mature,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Customers upload new document types,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security requirements expand, and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Users request additional workflow capabilities.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The true investment isn’t simply development. It’s ownership.&lt;/p&gt;

&lt;p&gt;That is why engineering teams should evaluate a PDF viewer using Total Cost of Ownership (TCO) rather than initial implementation cost alone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A practical total cost of ownership model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of asking,&lt;/p&gt;

&lt;p&gt;“How much will it cost to build?”&lt;/p&gt;

&lt;p&gt;ask,&lt;/p&gt;

&lt;p&gt;“How much will it cost to own?”&lt;/p&gt;

&lt;p&gt;A practical way to evaluate ownership is:&lt;/p&gt;

&lt;p&gt;PDF viewer TCO = Initial development + feature expansion + compatibility + quality assurance + security &amp;amp; accessibility + infrastructure + maintenance + customer support + opportunity cost&lt;/p&gt;

&lt;p&gt;Each category represents work that continues throughout the life of the application.&lt;/p&gt;

&lt;p&gt;Breaking down the cost&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost category&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Typical activities&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Initial development&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Rendering integration, UI, toolbar, navigation, APIs, deployment.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Feature expansion&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Search, annotations, forms, signatures, redaction, page management.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Compatibility&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Rendering fixes, regression corpus, browser differences, document edge cases.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Quality assurance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Browser testing, platform validation, accessibility testing, visual regression.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Security &amp;amp; compliance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Authentication, authorization, audit logging, permission management, security reviews.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Infrastructure&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Document storage, caching, rendering services, monitoring, logging.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Maintenance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Browser updates, framework upgrades, dependency updates, performance tuning.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Customer issue investigation, document analysis, troubleshooting.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Opportunity cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Engineering time diverted from core product innovation.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Many organizations estimate only the first row. The remaining categories often become the larger investment over time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The cost that rarely appears in project plans&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the largest expenses isn’t visible in engineering estimates. It’s opportunity cost. &lt;/p&gt;

&lt;p&gt;Every sprint spent maintaining PDF infrastructure is a sprint not spent building features that differentiate the product. For many teams, this opportunity cost becomes one of the largest long-term ownership expenses.&lt;/p&gt;

&lt;p&gt;Two organizations may spend the same engineering budget. One invests in customer-facing innovation, while the other maintains document infrastructure. From a product strategy perspective, those investments produce very different outcomes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A real-world scenario&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine a healthcare organization developing an internal PDF viewer for patient records.&lt;/p&gt;

&lt;p&gt;During development, the engineering team validates the application using PDFs generated by its own clinical systems, and everything works well. The rollout begins, but then hospitals start uploading documents received from external laboratories, insurance providers, specialist clinics, legacy healthcare systems, and third-party scanning platforms.&lt;/p&gt;

&lt;p&gt;Within days, support tickets begin to appear. Some PDFs display missing characters, others render slowly, and a few fail to open entirely. &lt;/p&gt;

&lt;p&gt;The engineering team discovers that the production documents differ significantly from those used during testing. The problem extends beyond rendering. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Support must securely collect affected documents.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security teams review document handling procedures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;QA expands the regression corpus.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Developers investigate rendering behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Product managers delay the rollout while fixes are validated.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The PDF Viewer wasn’t incomplete. It was simply tested against a much smaller set of document variations than production ultimately required. This is a common pattern in enterprise software. Production environments almost always introduce more diversity than internal testing environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recognizing when ownership is becoming expensive&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hidden ownership costs rarely appear at all at once. Instead, they accumulate gradually.&lt;/p&gt;

&lt;p&gt;Ownership costs may be increasing when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;PDF-related work appears in most releases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compatibility fixes continue to grow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance tuning becomes ongoing work.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Regression testing consumes more time each cycle.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Support tickets frequently involve document issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PDF maintenance competes with roadmap priorities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Specialized PDF expertise becomes concentrated in a few team members.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One or two of these indicators may be manageable. When several appear together, it’s worth re-evaluating whether continued ownership still aligns with the organization’s product strategy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The hidden cost lifecycle&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One customer issue rarely ends with a single bug fix. A typical production issue often follows this path:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fresource-center%2Fwp-content%2Fuploads%2Fsites%2F9%2F2026%2F07%2FThe-Hidden-Cost-Lifecycle-683x1024.jpg" class="article-body-image-wrapper"&gt;&lt;img width="683" height="1024" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fresource-center%2Fwp-content%2Fuploads%2Fsites%2F9%2F2026%2F07%2FThe-Hidden-Cost-Lifecycle-683x1024.jpg" alt="The Hidden Cost Lifecycle"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A seemingly simple PDF issue can involve multiple teams before reaching production. Repeated across hundreds of customer documents, these workflows can create significant long-term ownership costs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Build vs. buy isn’t a technical question alone&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By this point, one thing should be clear.&lt;/p&gt;

&lt;p&gt;Most engineering teams are capable of building a PDF Viewer. The more difficult question is whether they should own one.&lt;/p&gt;

&lt;p&gt;Choosing between an in-house implementation and a commercial PDF viewer SDK is rarely about technical ability. It is a strategic decision that affects engineering capacity, product velocity, maintenance effort, and long-term cost of ownership.&lt;/p&gt;

&lt;p&gt;There is no universal answer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;For some organizations, building a custom viewer is the right investment. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For others, owning PDF infrastructure diverts engineering resources away from the features that differentiate their product.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to avoid building. The goal is to own only the technology that creates competitive value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A practical build vs. buy decision framework&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following questions can help guide the decision.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Decision factor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;More likely to build&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;More likely to use an SDK&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PDF viewing is the product's primary differentiator&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Highly specialized rendering requirements&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Internal PDF expertise already exists&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full architectural control is essential&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vendor dependency is unacceptable&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fast time to market is important&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rich document workflows are required&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Broad browser and platform support is needed&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accessibility compliance is mandatory&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Engineering resources should remain focused on business features&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PDF functionality supports the application rather than defining it&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long-term maintenance should be minimized&lt;/td&gt;
&lt;td&gt;&amp;nbsp;&lt;/td&gt;
&lt;td&gt;✓&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;No single answer determines the outcome. Instead, evaluate which column most closely reflects your organization’s priorities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When building makes sense&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Developing a PDF viewer internally may be the right choice when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;PDF technology is central to your business.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The viewer itself is a competitive differentiator.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Requirements are highly specialized.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Long-term ownership aligns with your engineering strategy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Your organization already possesses deep expertise in PDF rendering and document processing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You have the resources to support compatibility, accessibility, testing, security, and ongoing maintenance over multiple years.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In these situations, the investment can provide greater flexibility and control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When an SDK is the better investment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For many organizations, PDF viewing is essential, but it isn’t the feature customers purchase the product for.&lt;/p&gt;

&lt;p&gt;An SDK often becomes the more practical choice when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Time-to-market is critical.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multiple frameworks or platforms must be supported.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enterprise features such as annotations, forms, signatures, or redaction are required.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Accessibility and compliance are important.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Engineering teams prefer focusing on business workflows rather than document infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Maintaining rendering compatibility is becoming an increasing engineering burden.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The objective is not to avoid engineering work. It is to concentrate engineering effort where it delivers the greatest business value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evaluating a PDF viewer SDK&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Choosing a PDF viewer SDK should involve the same level of scrutiny as any other long-term technical dependency. Rather than comparing products based solely on feature checklists, evaluate how well they perform in the real-world scenarios your application supports.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;1. Document compatibility&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A PDF viewer is only as useful as its ability to handle the documents your users work with every day. &lt;/p&gt;

&lt;p&gt;During evaluation, test the SDK using actual customer files rather than vendor-provided samples. Include a mix of scanned documents, engineering drawings, large reports, password-protected files, forms, multilingual content, and PDFs generated by different applications. &lt;/p&gt;

&lt;p&gt;The goal is to verify that rendering remains accurate and consistent across the document types most relevant to your business.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;2. Performance&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Performance should be assessed under realistic conditions, not just with small sample documents. Pay attention to how quickly the first page loads, how smoothly large documents scroll, how responsive search operations feel, and how well the viewer performs when users zoom, navigate, or switch pages. It’s also important to evaluate memory consumption and responsiveness on mobile devices, particularly if your application serves a diverse user base.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;3. Feature coverage&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A useful evaluation should consider not only today’s requirements but also the features your team may need in the future. Capabilities such as searching, bookmarks, annotations, comments, form filling, redaction, printing, and page organization are common requirements in production environments. Selecting an SDK that already supports anticipated workflows can help avoid costly custom development or migrations later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;4. Security&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PDF viewers often sit within applications that handle sensitive information, making security a critical evaluation criterion. Review how the SDK integrates with authentication and authorization systems, supports document access controls, and fits into your security architecture. It is also worth examining deployment options, audit capabilities, document retrieval mechanisms, and any requirements related to data residency or regulatory compliance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;5. Accessibility&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Accessibility should be treated as a core product requirement rather than a secondary feature. A strong PDF viewer SDK should support keyboard navigation, logical focus management, accessible forms, high-contrast themes, and compatibility with accessibility standards. Evaluating these capabilities early can help reduce the risk of expensive accessibility remediation work later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;6. Long-term ownership&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Beyond technical capabilities, consider what it will be like to rely on the vendor over the next several years. Review the frequency of updates, the quality of documentation, the availability of technical support, and how quickly security or compatibility issues are addressed. Understanding the product roadmap can also help determine whether the SDK is likely to evolve alongside your application’s future requirements.&lt;/p&gt;

&lt;p&gt;Ultimately, a PDF viewer SDK is more than a UI component. It becomes part of your application’s long-term technical foundation, so the evaluation process should focus not only on features but also on compatibility, performance, supportability, and long-term ownership.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Syncfusion addresses these ownership challenges&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The engineering challenges discussed throughout this article map directly to capabilities available in the Syncfusion® PDF Viewer SDK.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Engineering challenge&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Syncfusion capability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Engineering benefit&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Diverse PDF compatibility&lt;/td&gt;
&lt;td&gt;High-fidelity rendering engine&lt;/td&gt;
&lt;td&gt;Consistent rendering across a wide range of PDF documents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large-document performance&lt;/td&gt;
&lt;td&gt;Virtual page rendering, progressive loading&lt;/td&gt;
&lt;td&gt;Lower memory usage and smoother navigation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Feature expansion&lt;/td&gt;
&lt;td&gt;Built-in search, annotations, forms, signatures, redaction, printing&lt;/td&gt;
&lt;td&gt;Reduces the need to build common document workflows from scratch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cross-platform support&lt;/td&gt;
&lt;td&gt;Web, desktop, and mobile support&lt;/td&gt;
&lt;td&gt;Consistent behavior across deployment targets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Security&lt;/td&gt;
&lt;td&gt;Authentication integration, permission controls, secure viewing options&lt;/td&gt;
&lt;td&gt;Easier integration into enterprise applications&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accessibility&lt;/td&gt;
&lt;td&gt;Keyboard navigation, accessible UI, tagged PDF support&lt;/td&gt;
&lt;td&gt;Helps organizations build more inclusive document experiences&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long-term maintenance&lt;/td&gt;
&lt;td&gt;Regular product updates, documentation, and technical support&lt;/td&gt;
&lt;td&gt;Reduces ongoing ownership of foundational PDF infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Using a commercial SDK does not eliminate engineering responsibility.&lt;/p&gt;

&lt;p&gt;Development teams still own:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Business logic,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Authentication,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Application-specific workflows,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Integration,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deployment, and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What changes is which layer of the stack the organization chooses to own.&lt;/p&gt;

&lt;p&gt;Rather than investing engineering effort in rendering engines, compatibility fixes, and document infrastructure, teams can focus on the workflows that differentiate their applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Frequently asked questions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Q1. How much does it cost to build a PDF viewer?&lt;/p&gt;

&lt;p&gt;There is no fixed cost. It depends on the scope of the project, whether you’re using a browser-native viewer, building an open-source rendering library, developing a fully custom viewer, or integrating a commercial SDK. The true estimate should include long-term maintenance, testing, compatibility, accessibility, and support, not just initial development.&lt;/p&gt;

&lt;p&gt;Q2. Is using an open-source PDF library free?&lt;/p&gt;

&lt;p&gt;An open-source rendering library may eliminate licensing fees, but it does not eliminate engineering ownership. Teams are still responsible for building user workflows, maintaining compatibility, optimizing performance, testing across browsers, and supporting production issues.&lt;/p&gt;

&lt;p&gt;Q3. What is the most difficult part of PDF Viewer development?&lt;/p&gt;

&lt;p&gt;Many teams assume rendering is the hardest challenge. In practice, long-term compatibility, performance optimization, accessibility, testing, and supporting diverse real-world documents often require more engineering effort than the initial implementation.&lt;/p&gt;

&lt;p&gt;Q4. When should a company build its own PDF viewer?&lt;/p&gt;

&lt;p&gt;Building is generally appropriate when PDF technology is a core product differentiator, requirements are highly specialized, and the organization has the engineering capacity to maintain the solution over the long term.&lt;/p&gt;

&lt;p&gt;Q5. When is a PDF viewer SDK the better choice?&lt;/p&gt;

&lt;p&gt;A commercial SDK is often the better investment when organizations need enterprise features, broad compatibility, cross-platform support, faster delivery, and the ability to keep engineering teams focused on business-specific functionality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A PDF viewer prototype can often be built in a matter of days or weeks. A production-ready PDF platform is a long-term engineering commitment. The real investment begins after the first document renders.&lt;/p&gt;

&lt;p&gt;It continues through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Supporting unpredictable PDF documents,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Maintaining rendering quality,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optimizing performance,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Expanding feature sets,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensuring accessibility,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Managing security,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing across browsers and devices,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Investigating customer-reported documents, and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keeping pace with evolving web platforms.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these responsibilities automatically mean that organizations should avoid building a PDF viewer.&lt;/p&gt;

&lt;p&gt;In many cases, building is absolutely the right architectural decision.&lt;/p&gt;

&lt;p&gt;But it should be a deliberate decision based on the total PDF viewer development cost and long-term cost of ownership, not simply the effort required to produce an initial prototype.&lt;/p&gt;

&lt;p&gt;The most successful teams focus their engineering effort on capabilities that differentiate their products. Whether you choose to build or buy, understanding the long-term ownership implications is the key to making the right decision.&lt;/p&gt;

&lt;p&gt;If your goal is to deliver enterprise-grade PDF viewing without absorbing the long-term cost of building and maintaining document infrastructure, the Syncfusion PDF Viewer SDK provides a production-ready foundation with built-in support for rendering, annotations, forms, signatures, redaction, accessibility, and security workflows across .NET,&amp;nbsp;JavaScript,&amp;nbsp;Blazor,&amp;nbsp;Angular,&amp;nbsp;React,&amp;nbsp;Vue,&amp;nbsp;and other supported platforms.&lt;/p&gt;

&lt;p&gt;Instead of dedicating engineering resources to rendering engines, compatibility testing, and ongoing maintenance, teams can focus on building business-specific workflows that create customer value.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related articles
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/resource-center/why-black-boxes-dont-protect-sensitive-data/" rel="noopener noreferrer"&gt;PDF Redaction: Why Black Boxes Don’t Protect Sensitive Data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/resource-center/pdf-library-best-practices/" rel="noopener noreferrer"&gt;Best practices for working with PDF libraries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/resource-center/digitalsignature-encryption-pdf/" rel="noopener noreferrer"&gt;Working with Digital Signatures and Encryption in PDF documents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/resource-center/choose-best-pdf-library-dotnet/" rel="noopener noreferrer"&gt;Choosing the Best PDF Library for the .NET Framework&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>pdf</category>
      <category>pdfviewer</category>
      <category>documentprocessing</category>
      <category>fileformats</category>
    </item>
    <item>
      <title>A Complete Guide to Creating a Mind Map Using Angular Diagram Component</title>
      <dc:creator>Rajeshwari Pandinagarajan</dc:creator>
      <pubDate>Fri, 23 Dec 2022 11:02:33 +0000</pubDate>
      <link>https://dev.to/syncfusion/a-complete-guide-to-creating-a-mind-map-using-angular-diagram-component-59gh</link>
      <guid>https://dev.to/syncfusion/a-complete-guide-to-creating-a-mind-map-using-angular-diagram-component-59gh</guid>
      <description>&lt;p&gt;A single mind map can better illustrate concepts or ideas than a thousand words. We can easily display various ideas associated with a specific concept.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.syncfusion.com/angular-components/angular-diagram" rel="noopener noreferrer"&gt;Syncfusion Angular Diagram&lt;/a&gt; component is a powerful, extensible, and feature-rich library for visualizing, creating, and editing interactive diagrams.&lt;/p&gt;

&lt;p&gt;In this blog, we will see how to create a mind map diagram using the Syncfusion Angular Diagram component.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a mind map diagram
&lt;/h2&gt;

&lt;p&gt;The Syncfusion Angular Diagram component provides support to visualize mind maps from external data sources. In addition, data in any format can be easily converted, mapped, and consumed in the Diagram by setting a few properties.&lt;/p&gt;

&lt;p&gt;We are going to design the following mind map in this article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FCreating-a-mind-map-using-the-Angular-Diagram-component-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FCreating-a-mind-map-using-the-Angular-Diagram-component-1.png" alt="Creating a mind map using the Angular Diagram component"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Creating a mind map using the Angular Diagram component&lt;p&gt;&lt;/p&gt;

&lt;p&gt;In this image, the ellipse, rectangular boxes, and thick, straight lines with text represent nodes, while the curved lines represent connectors. The text inside the ellipse, rectangular box, and straight lines represent annotations.&lt;/p&gt;

&lt;p&gt;Follow these steps to create the mind map diagram using our Angular Diagram component:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First, refer to the &lt;a href="https://ej2.syncfusion.com/angular/documentation/diagram/getting-started/?no-cache=1" rel="noopener noreferrer"&gt;Getting started with Angular Diagram component documentation&lt;/a&gt; to see the dependent scripts and theme files required to integrate the component into your Angular application.&lt;/li&gt;
&lt;li&gt;Second, define the tree information as a JSON array.&lt;/li&gt;
&lt;li&gt;Create an instance of the Angular Diagram component.&lt;/li&gt;
&lt;li&gt;Then, configure the data to the &lt;strong&gt;dataSourceSettings&lt;/strong&gt; property of the created Diagram instance.&lt;/li&gt;
&lt;li&gt;Define the common formatting for all nodes and connectors through the &lt;strong&gt;getNodeDefaults&lt;/strong&gt; and &lt;strong&gt;getConnectorDefaults&lt;/strong&gt; methods, respectively.&lt;/li&gt;
&lt;li&gt;After configuring the data source, define the layout type as a &lt;strong&gt;mindmap&lt;/strong&gt; to arrange the nodes’ positions automatically.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The following code example includes all these steps. You can also find the same code on this &lt;a href="https://stackblitz.com/edit/angular-up5cv9?file=main.ts" rel="noopener noreferrer"&gt;StackBlitz&lt;/a&gt; page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;.html&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt; 
    &lt;span class="nt"&gt;&amp;lt;ejs-diagram&lt;/span&gt; &lt;span class="err"&gt;#diagram&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"diagram"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"100%"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"700px"&lt;/span&gt; &lt;span class="err"&gt;[getNodeDefaults]=getNodeDefaults&lt;/span&gt; &lt;span class="err"&gt;[snapSettings]=snapSettings&lt;/span&gt; &lt;span class="err"&gt;[scrollSettings]="scrollSettings"&lt;/span&gt; &lt;span class="err"&gt;[selectedItems]="selectedItems"&lt;/span&gt; &lt;span class="err"&gt;[getCustomTool]='getCustomTool'&lt;/span&gt; &lt;span class="err"&gt;(selectionChange)="selectionChange($event)"&lt;/span&gt; &lt;span class="err"&gt;(created)="create($event)"&lt;/span&gt; &lt;span class="err"&gt;[tool]=tool&lt;/span&gt; &lt;span class="err"&gt;[layout]='layout'&lt;/span&gt; &lt;span class="err"&gt;[dataSourceSettings]='data'&lt;/span&gt; &lt;span class="err"&gt;[getConnectorDefaults]='getConnDefaults'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/ejs-diagram&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;.ts&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ViewEncapsulation&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ViewChild&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;DiagramComponent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Diagram&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;ConnectorModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Connector&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;HierarchicalTree&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;DataBinding&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;PointPortModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;SnapSettingsModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;ScrollSettingsModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;PortVisibility&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;MindMap&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;SnapConstraints&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;NodeModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;DiagramTools&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;ConnectorConstraints&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;PointPort&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@syncfusion/ej2-angular-diagrams&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;DataManager&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@syncfusion/ej2-data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;Diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Inject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;DataBinding&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;MindMap&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;HierarchicalTree&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="cm"&gt;/**
 * Sample for Mind Map Tree
 */&lt;/span&gt;
&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app-root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;templateUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app.component.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;styleUrls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app.component.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;encapsulation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ViewEncapsulation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AppComponent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;ViewChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;diagram&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DiagramComponent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DiagramTools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;DiagramTools&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ZoomPan&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;Data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Creativity&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Brainstorming&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Complementing&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Sessions&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Generate&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Local&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;26&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Remote&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Individual&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Teams&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Ideas&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Engagement&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;31&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Product&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Service&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;33&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Business Direction&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;34&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Empowering&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;35&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Ownership&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Information&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;51&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Expectations&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;53&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Competitors&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;54&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Products&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;55&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Features&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;56&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Other Data&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;59&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Organization&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;51&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Customer&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;51&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;61&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Staff&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;51&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;62&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Stakeholders&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;51&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="c1"&gt;//Get mind map data.&lt;/span&gt;
  &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DataManager&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DataManager&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;parentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;parentId&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;dataSource&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;root&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="c1"&gt;//Define layout.&lt;/span&gt;
  &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;layout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;MindMap&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;horizontalSpacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;getBranch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt;&lt;span class="p"&gt;[])&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;snapSettings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SnapSettingsModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;constraints&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SnapConstraints&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;scrollSettings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ScrollSettingsModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;scrollLimit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Infinity&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fitToPage&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="c1"&gt;//Define node default settings.&lt;/span&gt;
  &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;getNodeDefaults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Function&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nodeDefaults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="c1"&gt;//Define connector default settings&lt;/span&gt;
  &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;getConnDefaults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Function&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getConnectorDefaults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;nodeDefaults&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;treeInfo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shape&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Basic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Ellipse&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;borderColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;black&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nx"&gt;treeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;treeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
          &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#8E44AD&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
          &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;treeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;treeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
          &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#3498DB&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
          &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#E74C3C&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;strokeColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;strokeWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;annotations&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PointPortModel&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getPort&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;PointPort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ports&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="c1"&gt;//sets connector default value.&lt;/span&gt;
  &lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;getConnectorDefaults&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ConnectorModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Diagram&lt;/span&gt;
  &lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;ConnectorModel&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Bezier&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetDecorator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;None&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;sourceNode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourceID&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetID&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;treeInfo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;constraints&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;=&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="nx"&gt;ConnectorConstraints&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Select&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;treeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;treeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourcePortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sourceNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetPortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;treeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;treeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourcePortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sourceNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetPortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;getPort&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nx"&gt;PointPortModel&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PointPortModel&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;port1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;visibility&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PortVisibility&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Hidden&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;black&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;port2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;visibility&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PortVisibility&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Hidden&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;black&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;Left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;Right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;Root&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;Level&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Interactivity using keyboard and mouse
&lt;/h2&gt;

&lt;p&gt;You can interactively build the mind map diagram using the mouse, touch, and keyboard interfaces. Let’s see how to do so with code examples.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick commands
&lt;/h3&gt;

&lt;p&gt;Frequently used commands can be shown as buttons near a selector. You can define the actions as commands for buttons. By doing so, you can perform that action by just clicking the button.&lt;/p&gt;

&lt;p&gt;Refer to the following code example and the same on &lt;a href="https://stackblitz.com/edit/angular-ebw26q?file=main.ts" rel="noopener noreferrer"&gt;StackBlitz&lt;/a&gt;. Here, we have rendered buttons for deleting and left- and right-handling actions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;UserHandleModel&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;leftHandle&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;visible&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;black&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;side&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;pathColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;pathData&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;M11.924,6.202 L4.633,6.202 L4.633,9.266 L0,4.633 L4.632,0 L4.632,3.551 L11.923,3.551 L11.923,6.202Z&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;horizontalAlignment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;verticalAlignment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Top&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;delete&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;side&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Top&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;horizontalAlignment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;verticalAlignment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;pathData&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;M 7.04 22.13 L 92.95 22.13 L 92.95 88.8 C 92.95 91.92 91.55 94.58 88.76&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;96.74 C 85.97 98.91 82.55 100 78.52 100 L 21.48 100 C 17.45 100 14.03 98.91 11.24 96.74 C 8.45 94.58 7.04&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;91.92 7.04 88.8 z M 32.22 0 L 67.78 0 L 75.17 5.47 L 100 5.47 L 100 16.67 L 0 16.67 L 0 5.47 L 24.83 5.47 z&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;pathColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rightHandle&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;horizontalAlignment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;verticalAlignment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Top&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;pathColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;pathData&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;M0,3.063 L7.292,3.063 L7.292,0 L11.924,4.633 L7.292,9.266 L7.292,5.714 L0.001,5.714 L0.001,3.063Z&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;side&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;black&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;selectedItems&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SelectorModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;constraints&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SelectorConstraints&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;UserHandle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;userHandles&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FCreating-mind-map-using-quick-commands-in-Angular-Diagram-component-1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FCreating-mind-map-using-quick-commands-in-Angular-Diagram-component-1.gif" alt="Creating mind map using quick commands in Angular Diagram component"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Creating mind map using quick commands in Angular Diagram component&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Shortcut keys
&lt;/h3&gt;

&lt;p&gt;Using the shortcut keys, you can quickly create mind maps. Based on the specific key gestures, you can specify the actions to be executed.&lt;/p&gt;

&lt;p&gt;For example, &lt;strong&gt;Tab&lt;/strong&gt; can be used to add a new topic to the right, &lt;strong&gt;Shift+Tab&lt;/strong&gt; to the left, and &lt;strong&gt;Delete&lt;/strong&gt; to delete the topic and its subtopics.&lt;/p&gt;

&lt;p&gt;Refer to the following code example and the same on &lt;a href="https://stackblitz.com/edit/angular-ec2jz5-2xvqut?file=main.ts" rel="noopener noreferrer"&gt;StackBlitz&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;commandManager&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;gesture&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Keys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Tab&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="na"&gt;canExecute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;canExecute&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
          &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addLeftChild&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;leftChild&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;gesture&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Keys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Tab&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;keyModifiers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;KeyModifiers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Shift&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="na"&gt;canExecute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;canExecute&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
          &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addRightChild&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rightChild&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;gesture&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Keys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Delete&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="na"&gt;canExecute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;canExecute&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
          &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;removeChild&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;deleteChid&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;addLeftChild&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;any&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;selectedItems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;addNode&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;EmployeeInfo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;EmployeeInfo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;EmployeeInfo&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
          &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;EmployeeInfo&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;EmployeeInfo&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ConnectorModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;addConnector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clearSelection&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;nd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;doLayout&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startTextEdit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nd&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;addRightChild&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;any&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;selectedItems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;addNode&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;EmployeeInfo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;EmployeeInfo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;EmployeeInfo&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;EmployeeInfo&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
          &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;EmployeeInfo&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ConnectorModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;addConnector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clearSelection&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;nd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;doLayout&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startTextEdit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nd&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;removeChild&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;any&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;selectedItems&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;selectedObject&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeSubChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;doLayout&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="c1"&gt;//Remove the subchild Elements&lt;/span&gt;
  &lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;removeSubChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;i&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;outEdges&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Connector&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;outEdges&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Connector&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;childNode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetID&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;childNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;outEdges&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeSubChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;childNode&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;childNode&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FCreating-a-Mind-Map-using-Keyboard-Shortcuts-in-Angular-Diagram-Component-2.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FCreating-a-Mind-Map-using-Keyboard-Shortcuts-in-Angular-Diagram-Component-2.gif" alt="Creating a mind map using keyboard shortcuts in Angular Diagram component"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Creating a Mind Map using Keyboard Shortcuts in Angular Diagram Component&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Expand and collapse children nodes
&lt;/h2&gt;

&lt;p&gt;Use the &lt;strong&gt;expandIcon&lt;/strong&gt; and &lt;strong&gt;collapseIcon&lt;/strong&gt; properties of nodes to implement the expand and collapse features in the mind map’s children nodes.&lt;/p&gt;

&lt;p&gt;Refer to the following example and the same on &lt;a href="https://stackblitz.com/edit/angular-uer4j3-dsdrol?file=main.ts" rel="noopener noreferrer"&gt;StackBlitz&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;getNodeDefaults&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;........&lt;/span&gt; 
        &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;expandIcon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Minus&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;};&lt;/span&gt;
        &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;collapseIcon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Plus&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;........&lt;/span&gt; 
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FExpanding-and-collapsing-nodes-in-a-mind-map-using-Angular-Diagram-component-1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FExpanding-and-collapsing-nodes-in-a-mind-map-using-Angular-Diagram-component-1.gif" alt="Expanding and collapsing nodes in a mind map using Angular Diagram component"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Expanding and collapsing nodes in a mind map using Angular Diagram component&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Drag and drop
&lt;/h2&gt;

&lt;p&gt;You can easily change the mind map layout by dragging a topic or subtopic and dropping it on the required location.&lt;/p&gt;

&lt;p&gt;Add the following code to the Diagram control’s &lt;strong&gt;drop&lt;/strong&gt; method to enable editing in the mind map’s tree structure. Also, the same code is available on &lt;a href="https://stackblitz.com/edit/angular-eqg2xa-uruchn?file=main.ts" rel="noopener noreferrer"&gt;StackBlitz&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;drop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ConnectorModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;inEdges&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourceID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dataBind&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;doLayout&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="c1"&gt;//Update connector connection direction.&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;srcNode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;srctreeInfo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;srcNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;targettreeInfo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;srctreeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;srctreeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;targettreeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
          &lt;span class="nx"&gt;targettreeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourcePortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetPortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;srcNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;updateRightTopicOutEdges&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;srcNode&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;srctreeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;srctreeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;targettreeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
          &lt;span class="nx"&gt;targettreeInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourcePortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetPortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;srcNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;updateLeftTopicOutEdges&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;srcNode&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="c1"&gt;// update your local data source when modifying mind map topics.&lt;/span&gt;
      &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;updateDataSource&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;updateRightTopicOutEdges&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;outEdges&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;outconnector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ConnectorModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;outEdges&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;outconnector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourcePortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;port2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;outconnector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetPortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;port1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;outconnector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetID&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;targetNode&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;outEdges&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;updateRightTopicOutEdges&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;updateLeftTopicOutEdges&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;outEdges&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;outconnector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ConnectorModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;outEdges&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;outconnector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourcePortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;port1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;outconnector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetPortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;port2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;outconnector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetID&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;targetNode&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;outEdges&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;updateLeftTopicOutEdges&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;updateDataSource&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;updateData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;updateData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;updateData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parentId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FDragging-and-dropping-nodes-in-a-mind-map-using-Angular-Diagram-component-1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FDragging-and-dropping-nodes-in-a-mind-map-using-Angular-Diagram-component-1.gif" alt="Dragging and dropping nodes in a mind map using Angular Diagram component"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Dragging and dropping nodes in a mind map using Angular Diagram component&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Mind map shape customization
&lt;/h2&gt;

&lt;p&gt;You can easily customize the appearance of each level of nodes by adding backgrounds, border styles, text styles, and images and visualize them with a custom UI design.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;getNodeDefaults&lt;/strong&gt; method lets you specify a custom shape and style for each node based on its level value.&lt;/p&gt;

&lt;p&gt;Refer to the following code example and the same on &lt;a href="https://stackblitz.com/edit/angular-qdjxrc?file=main.ts" rel="noopener noreferrer"&gt;StackBlitz&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;getNodeDefaults&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;constraints&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;NodeConstraints&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Default&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="nx"&gt;NodeConstraints&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Drag&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
      &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
      &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shape&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Basic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Ellipse&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Rectangle&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;};&lt;/span&gt;
      &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;borderColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;black&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#E74C3C&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#F39C12&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;strokeColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;strokeWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;};&lt;/span&gt;
      &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;annotations&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;];&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
        &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
          &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Level&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
            &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Green&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
            &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#8E44AD&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
          &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Level&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
          &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Green&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
          &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#3498DB&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shape&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Basic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Level&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Ellipse&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Rectangle&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;};&lt;/span&gt;
      &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;strokeWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
      &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;minWidth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Level&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;annotations&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Label&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Level&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="na"&gt;verticalAlignment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Level&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Center&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Bottom&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Level&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;black&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;];&lt;/span&gt;
      &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shape&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;TextModel&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PointPortModel&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getPort&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;any&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;PointPort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ports&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="c1"&gt;//sets connector default value&lt;/span&gt;
  &lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;getConnectorDefaults&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ConnectorModel&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;any&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Diagram&lt;/span&gt;
  &lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;ConnectorModel&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;sourceNode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourceID&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetID&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Bezier&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetDecorator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;shape&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;None&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;constraints&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;=&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="nx"&gt;ConnectorConstraints&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Select&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subRight&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourcePortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sourceNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetPortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;strokeWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;strokeColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#8E44AD&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;empInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;subLeft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourcePortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sourceNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;targetPortID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;targetNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;strokeWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;strokeColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#3498DB&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;connector&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="kr"&gt;private&lt;/span&gt; &lt;span class="nf"&gt;getPort&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nx"&gt;PointPortModel&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PointPortModel&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;port1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;visibility&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PortVisibility&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Hidden&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;black&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;port2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;visibility&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PortVisibility&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Hidden&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;black&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;port&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FCustomizing-the-shapes-in-a-mind-map-using-the-Angular-Diagram-component-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FCustomizing-the-shapes-in-a-mind-map-using-the-Angular-Diagram-component-1.png" alt="Customizing the shapes in a mind map using the Angular Diagram component"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Customizing the shapes in a mind map using the Angular Diagram component&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Spacing
&lt;/h2&gt;

&lt;p&gt;Adjust the spacing between each level of the mind map diagram horizontally and vertically. You can also define a margin around the mind map diagram, like in the following code example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;layout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;MindMap&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;horizontalSpacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;verticalSpacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;getBranch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NodeModel&lt;/span&gt;&lt;span class="p"&gt;[])&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;Node&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;TreeInfo&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FCustomizing-the-spacing-between-nodes-in-a-mind-map-using-the-Angular-Diagram-component.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FCustomizing-the-spacing-between-nodes-in-a-mind-map-using-the-Angular-Diagram-component.png" alt="Customizing the spacing between nodes in a mind map using the Angular Diagram component"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Customizing the spacing between nodes in a mind map using the Angular Diagram component&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Zooming and panning
&lt;/h2&gt;

&lt;p&gt;Viewing a large mind map on a small screen can be challenging. In that case, zooming and panning help us provide a more detailed view of the mind map.&lt;/p&gt;

&lt;p&gt;You can zoom in and out of the diagram using the &lt;strong&gt;Ctrl + mouse wheel&lt;/strong&gt; shortcut key.&lt;/p&gt;

&lt;p&gt;Refer to the following code examples and the same on &lt;a href="https://stackblitz.com/edit/angular-ofcbka?file=main.ts" rel="noopener noreferrer"&gt;StackBlitz&lt;/a&gt; to enable zooming and panning support in the mind map diagram.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;.html&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"col-lg-8 control-section"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"width: 100%;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"content-wrapper"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;ejs-diagram&lt;/span&gt;
      &lt;span class="err"&gt;#diagram&lt;/span&gt;
      &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"diagram"&lt;/span&gt;
      &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"100%"&lt;/span&gt;
      &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"700px"&lt;/span&gt;
      &lt;span class="err"&gt;[getNodeDefaults]="getShapeDefaults"&lt;/span&gt;
      &lt;span class="err"&gt;[snapSettings]="snapSettings"&lt;/span&gt;
      &lt;span class="err"&gt;[scrollSettings]="scrollSettings"&lt;/span&gt;
      &lt;span class="err"&gt;[tool]="tool"&lt;/span&gt;
      &lt;span class="err"&gt;[layout]="layout"&lt;/span&gt;
      &lt;span class="err"&gt;[dataSourceSettings]="data"&lt;/span&gt;
      &lt;span class="err"&gt;[getConnectorDefaults]="getConnDefaults"&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/ejs-diagram&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;.ts&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Enable pan tool.&lt;/span&gt;
  &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DiagramTools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;DiagramTools&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ZoomPan&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FZooming-and-panning-in-a-mind-map-using-Angular-Diagram-component-1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.syncfusion.com%2Fblogs%2Fwp-content%2Fuploads%2F2022%2F12%2FZooming-and-panning-in-a-mind-map-using-Angular-Diagram-component-1.gif" alt="Zooming and panning in a mind map using Angular Diagram component"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Zooming and panning in a mind map using Angular Diagram component&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Exporting
&lt;/h2&gt;

&lt;p&gt;You can easily export the mind map diagram to different image formats such as PNG, JPEG, BMP, and SVG.&lt;/p&gt;

&lt;p&gt;Refer to the following code example and the same on &lt;a href="https://stackblitz.com/edit/angular-psm6ou?file=main.ts" rel="noopener noreferrer"&gt;StackBlitz&lt;/a&gt; to explore this feature.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;exportOptions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;IExportOptions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
    &lt;span class="nx"&gt;exportOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;FileFormats&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;exportOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Download&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;exportOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;region&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;exportOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;multiplePage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;exportOptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fileName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Mindmap&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;diagram&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exportDiagram&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;exportOptions&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Thanks for reading! In this blog post, we have seen how to create and customize a mind map using the Syncfusion &lt;a href="https://www.syncfusion.com/angular-components/angular-diagram" rel="noopener noreferrer"&gt;Angular Diagram&lt;/a&gt; component. With the same component, you can also create flowcharts, organizational charts, floor plans, UML diagrams, and BPMN charts. Try out the steps in this blog and provide your feedback in the comments section!&lt;/p&gt;

&lt;p&gt;If you would like to try out the Diagram, You can download our free trial. You can also look at the Diagram source on &lt;a href="https://github.com/syncfusion/ej2-angular-ui-components" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and check our &lt;a href="https://ej2.syncfusion.com/angular/demos/#/material/diagram/default-functionalities" rel="noopener noreferrer"&gt;live demo&lt;/a&gt; and &lt;a href="https://ej2.syncfusion.com/angular/documentation/diagram/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; for detailed explanations.&lt;/p&gt;

&lt;p&gt;Contact us through our &lt;a href="https://www.syncfusion.com/forums" rel="noopener noreferrer"&gt;support forum&lt;/a&gt;, &lt;a href="https://support.syncfusion.com/" rel="noopener noreferrer"&gt;support portal&lt;/a&gt;, or &lt;a href="https://www.syncfusion.com/feedback/angular" rel="noopener noreferrer"&gt;Feedback Portal&lt;/a&gt;. We are always happy to assist you!&lt;/p&gt;

&lt;h2&gt;
  
  
  Related blogs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/debug-angular-apps-easily-using-angular-devtools.aspx" rel="noopener noreferrer"&gt;Debug Angular Apps Easily Using Angular DevTools &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/easy-steps-to-create-a-read-only-angular-pdf-viewer.aspx" rel="noopener noreferrer"&gt;Easy Steps to Create a Read-Only Angular PDF Viewer &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/easily-generate-bulk-reports-using-mail-merge-in-angular.aspx" rel="noopener noreferrer"&gt;Easily Generate Bulk Reports Using Mail Merge in Angular &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/top-7-features-of-angular-14.aspx" rel="noopener noreferrer"&gt;Top 7 Features of Angular 14&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>angular</category>
      <category>web</category>
      <category>development</category>
      <category>diagram</category>
    </item>
    <item>
      <title>Introducing the New Angular Image Editor Component</title>
      <dc:creator>Rajeshwari Pandinagarajan</dc:creator>
      <pubDate>Fri, 11 Nov 2022 12:19:27 +0000</pubDate>
      <link>https://dev.to/syncfusion/introducing-the-new-angular-image-editor-component-28c</link>
      <guid>https://dev.to/syncfusion/introducing-the-new-angular-image-editor-component-28c</guid>
      <description>&lt;p&gt;We are happy to introduce the new &lt;a href="https://www.syncfusion.com/angular-components/angular-image-editor"&gt;Angular Image Editor &lt;/a&gt;component with our latest release, &lt;a href="https://www.syncfusion.com/forums/177858/essential-studio-2022-volume-3-main-release-v20-3-0-47-is-available-for-download"&gt;2022 Volume 3&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Let’s explore its features and UI design!&lt;/p&gt;

&lt;h2&gt;
  
  
  Image Editor overview
&lt;/h2&gt;

&lt;p&gt;The Angular Image Editor is a graphical user interface for editing images. It provides built-in support to rotate, flip, zoom, and crop images. Users can insert annotations including text, freehand drawings, and shapes such as rectangles, ellipses, and lines. Also, the control supports keyboard interactions, events, and an optimized UI for touch gestures.&lt;/p&gt;

&lt;p&gt;The following GIF image shows some of its features in action.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f-LkV48E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Angular-Image-Editor-Component-1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f-LkV48E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Angular-Image-Editor-Component-1.gif" alt="Angular Image Editor Component" width="600" height="291"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Angular Image Editor Component&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Use cases
&lt;/h2&gt;

&lt;p&gt;The Angular Image Editor is a great fit for the following applications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Profile&lt;/strong&gt;  &lt;strong&gt;pictures&lt;/strong&gt; : Crop any image and use it as your profile picture through the component’s user-friendly APIs. You can customize the Image Editor’s capabilities for this use by changing its toolbar or using external buttons.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Photo editor&lt;/strong&gt; : Use all the common image editing features built into the component’s toolbar. You can easily integrate the Image Editor into web or mobile applications to provide image editing capabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key features
&lt;/h2&gt;

&lt;p&gt;The following are the key features available in the Angular Image Editor component:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Load and save an image.&lt;/li&gt;
&lt;li&gt;
Select and crop an image.&lt;/li&gt;
&lt;li&gt;
Transform an image.&lt;/li&gt;
&lt;li&gt;
Annotate an image.&lt;/li&gt;
&lt;li&gt;
Zoom and pan an image.&lt;/li&gt;
&lt;li&gt;
Customize the toolbar.&lt;/li&gt;
&lt;li&gt;
Responsive, touch-friendly UI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s see how these features work with code examples.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;Load and save an image&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Image Editor component can open base64, image data, or hosted and online URL images using the  &lt;strong&gt;open ** method. You can also open an image by clicking the **Open&lt;/strong&gt; button in the toolbar. The supported file types are PNG, JPEG, SVG, and base64.&lt;/p&gt;

&lt;p&gt;Users can also edit images and save them as &lt;strong&gt;ImageData&lt;/strong&gt; using the &lt;strong&gt;getImageData&lt;/strong&gt; method. To save images in PNG, JPEG, and SVG formats, users can use the &lt;strong&gt;export&lt;/strong&gt; method, which accepts file type and file name as parameters.&lt;/p&gt;

&lt;p&gt;In the following code example, the &lt;strong&gt;open&lt;/strong&gt; method is used to open a hosted image.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"wrapperDiv"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"width:550px; height:350px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ejs-imageeditor&lt;/span&gt; &lt;span class="err"&gt;(created)="created()"&lt;/span&gt; &lt;span class="err"&gt;#ImageEditor&lt;/span&gt; &lt;span class="err"&gt;[toolbar]='toolbarItems'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/ejs-imageeditor&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

export class AppComponent {
 @ViewChild('ImageEditor')
 public ImageEditorInstance!: ImageEditorComponent;
 public toolbarItems: string[] = [];
 public created = (): void =&amp;gt; {
  this.ImageEditorInstance.open("http://localhost:6969/image/bridge.png");
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output of this code example is shown in the following image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3hVybjLL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Viewing-an-Image-Using-Angular-Image-Editor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3hVybjLL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Viewing-an-Image-Using-Angular-Image-Editor.png" alt="Viewing an Image Using Angular Image Editor" width="499" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Viewing an Image Using Angular Image Editor&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; To view hosted images, you need to enable the &lt;strong&gt;Directory Browsing&lt;/strong&gt; option in &lt;strong&gt;IIS&lt;/strong&gt; , which creates a &lt;strong&gt;web.config&lt;/strong&gt; file inside the hosted folder. Add the following code in the &lt;strong&gt;web.config&lt;/strong&gt; file to resolve the CORS issue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;system.webServer&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;directoryBrowse&lt;/span&gt; &lt;span class="na"&gt;enabled=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;httpProtocol&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;customHeaders&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;clear&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;add&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"Access-Control-Allow-Origin"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"*"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/customHeaders&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/httpProtocol&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/system.webServer&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;a&gt;Selection and cropping&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Image Editor component supports multiple selection options including square, circle, and custom shapes. It can also handle various aspect ratios. You can crop an image by dragging and resizing the selection region. You can perform selection by either using the toolbar or the &lt;strong&gt;select&lt;/strong&gt; method.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;select&lt;/strong&gt; method, we have to specify the selection type (custom, square, or circle) and aspect ratios (3:2, 4:3, 5:4, 7:5, or 16:9).&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;toolbar&lt;/strong&gt; , we can perform selection by just clicking the &lt;strong&gt;Crop&lt;/strong&gt; dropdown button and picking a selection shape (custom, square, or circle) and aspect ratio.&lt;/p&gt;

&lt;h4&gt;
  
  
  Cropping
&lt;/h4&gt;

&lt;p&gt;The Angular Image Editor can crop any image based on a user-defined selection. The cropping can be made by either using the toolbar or the &lt;strong&gt;crop&lt;/strong&gt; method.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;toolbar&lt;/strong&gt; , we can perform cropping by clicking the *&lt;em&gt;OK *&lt;/em&gt; button that is enabled after the user selects a part of the image.&lt;/p&gt;

&lt;p&gt;In the following code example, we have used the &lt;strong&gt;select&lt;/strong&gt; and &lt;strong&gt;crop&lt;/strong&gt; methods to perform circular selection and crop the image.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"padding-bottom: 10px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="select()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Select&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="crop()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Crop&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"wrapperDiv"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"width:550px; height:350px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ejs-imageeditor&lt;/span&gt; &lt;span class="err"&gt;(created)="created()"&lt;/span&gt; &lt;span class="err"&gt;#ImageEditor&lt;/span&gt; &lt;span class="err"&gt;[toolbar]='toolbarItems'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/ejs-imageeditor&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
export class AppComponent {
 @ViewChild('ImageEditor')
 public ImageEditorInstance!: ImageEditorComponent;
 public toolbarItems: string[] = [];
 public created = (): void =&amp;gt; {
  this.ImageEditorInstance.open("http://localhost:6969/image/bridge.png");
 }
 public select = (): void =&amp;gt; {
  this.ImageEditorInstance.select('circle');
 }
 public crop = (): void =&amp;gt; {
  this.ImageEditorInstance.crop();
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jjPhhbOk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Cropping-an-Image-Using-Angular-Image-Editor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jjPhhbOk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Cropping-an-Image-Using-Angular-Image-Editor.png" alt="Cropping an Image Using Angular Image Editor" width="524" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Cropping an Image Using Angular Image Editor&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;Transform an image&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Angular Image Editor component has  &lt;strong&gt;rotate&lt;/strong&gt; and &lt;strong&gt;flip&lt;/strong&gt; transformation support. The rotation transformation allows users to rotate an image clockwise or counterclockwise 90, 180, 270, or 360 degrees. The flip transformation supports horizontal and vertical orientations. We can perform both transformations by either using the toolbar or the rotate and flip methods.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;toolbar&lt;/strong&gt; , we can perform rotate and flip actions by clicking the &lt;strong&gt;Transform&lt;/strong&gt; dropdown button and selecting one of the &lt;strong&gt;Rotate Left&lt;/strong&gt; , &lt;strong&gt;Rotate Right&lt;/strong&gt; , &lt;strong&gt;Horizontal Flip&lt;/strong&gt; , or &lt;strong&gt;Vertical Flip&lt;/strong&gt; options.&lt;/p&gt;

&lt;p&gt;In the following code example, the &lt;strong&gt;rotate&lt;/strong&gt; and &lt;strong&gt;flip&lt;/strong&gt; methods are used to perform rotation and flip actions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"padding-bottom: 10px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="rotate()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Rotate&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="flip()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Flip&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"wrapperDiv"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"width:550px; height:350px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ejs-imageeditor&lt;/span&gt; &lt;span class="err"&gt;(created)="created()"&lt;/span&gt; &lt;span class="err"&gt;#ImageEditor&lt;/span&gt; &lt;span class="err"&gt;[toolbar]='toolbarItems'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/ejs-imageeditor&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;


export class AppComponent {
 @ViewChild('ImageEditor')
 public ImageEditorInstance!: ImageEditorComponent;
 public toolbarItems: string[] = [];
 public created = (): void =&amp;gt; {
  this.ImageEditorInstance.open("http://localhost:6969/image/bridge.png");
 }
 public rotate = (): void =&amp;gt; {
  this.ImageEditorInstance.rotate(90);
 }
 public flip = (): void =&amp;gt; {
  this.ImageEditorInstance.flip("Vertical");
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0sancqpG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Rotate-and-Flip-Options-in-Angular-Image-Editor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0sancqpG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Rotate-and-Flip-Options-in-Angular-Image-Editor.png" alt="Rotate and Flip Options in Angular Image Editor" width="503" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Rotate and Flip Options in Angular Image Editor&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;Annotations&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Angular Image Editor component supports multiple types of annotations, including text, freehand drawings, and shapes such as rectangles, ellipses, and lines.&lt;/p&gt;

&lt;h4&gt;
  
  
  Text
&lt;/h4&gt;

&lt;p&gt;You can insert a text annotation and customize it by changing its color, font family, font size, and font styles, such as bold and italic. You can add a text annotation by either using the toolbar or the &lt;strong&gt;drawText&lt;/strong&gt; method.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;drawText&lt;/strong&gt; method, you can insert a text annotation by specifying the text, font family, font size, and font styles.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;toolbar,&lt;/strong&gt;  we can insert a text annotation by just clicking the &lt;strong&gt;Annotation&lt;/strong&gt; dropdown button and picking the &lt;strong&gt;Add Text&lt;/strong&gt; option. Once the text is inserted, the contextual toolbar will be enabled to customize the annotation’s color, font family, font size, and font styles, such as bold and italic.&lt;/p&gt;

&lt;h4&gt;
  
  
  Shapes
&lt;/h4&gt;

&lt;p&gt;You can insert and customize the shape annotations such as rectangles, ellipses, and lines by changing their stroke color, fill color, and stroke width. Shape annotations can be made by either using the toolbar or the &lt;strong&gt;drawRectangle&lt;/strong&gt; , &lt;strong&gt;drawEllipse&lt;/strong&gt; , and &lt;strong&gt;drawLine&lt;/strong&gt; methods.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;toolbar&lt;/strong&gt; , we can insert the shape annotations by clicking the &lt;strong&gt;Annotation&lt;/strong&gt; dropdown button and picking either the &lt;strong&gt;Rectangle&lt;/strong&gt;** , **** Ellipse *&lt;em&gt;**,&lt;/em&gt;* or &lt;strong&gt;Line&lt;/strong&gt; options. Once the shape is inserted, the contextual toolbar will be enabled to customize the annotation’s stroke color, fill color, and stroke width.&lt;/p&gt;

&lt;p&gt;In the following code example, the &lt;strong&gt;drawText&lt;/strong&gt; method is used to insert text, and the &lt;strong&gt;drawRectangle&lt;/strong&gt;** , **** drawEllipse *&lt;em&gt;**,&lt;/em&gt;* and &lt;strong&gt;drawLine&lt;/strong&gt; methods are used to insert the respective annotation shapes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"padding-bottom: 10px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="text()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Add Text&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="rectangle()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Rectangle&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="ellipse()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Ellipse&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="line()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Line&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"wrapperDiv"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"width:550px; height:350px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ejs-imageeditor&lt;/span&gt; &lt;span class="err"&gt;(created)="created()"&lt;/span&gt; &lt;span class="err"&gt;#ImageEditor&lt;/span&gt; &lt;span class="err"&gt;[toolbar]='toolbarItems'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/ejs-imageeditor&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

export class AppComponent {
 @ViewChild('ImageEditor')
 public ImageEditorInstance!: ImageEditorComponent;
 public toolbarItems: string[] = [];
 public created = (): void =&amp;gt; {
  this.ImageEditorInstance.open("http://localhost:6969/image/bridge.png");
 }
 public text = (): void =&amp;gt; {
  this.ImageEditorInstance.drawText(50, 50, 'Syncfusion');
 }
 public rectangle = (): void =&amp;gt; {
  this.ImageEditorInstance.drawRectangle(50, 300);
 }
 public ellipse = (): void =&amp;gt; {
  this.ImageEditorInstance.drawEllipse(1000, 300);
 }
 public line = (): void =&amp;gt; {
  this.ImageEditorInstance.drawLine(1000, 150);
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lyvTX0VK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Text-and-Shapes-Annotation-Feature-in-Angular-Image-Editor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lyvTX0VK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Text-and-Shapes-Annotation-Feature-in-Angular-Image-Editor.png" alt="Text and Shapes Annotation Feature in Angular Image Editor" width="541" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Text and Shapes Annotation Feature in Angular Image Editor&lt;p&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Freehand drawing
&lt;/h4&gt;

&lt;p&gt;You can easily insert a freehand drawing annotation and customize it by changing its stroke color and stroke width. The freehand drawing annotation can be made by either using the toolbar or the &lt;strong&gt;freehandDraw&lt;/strong&gt; method.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;toolbar&lt;/strong&gt; , you can insert the freehand draw annotation by clicking the &lt;strong&gt;Annotation&lt;/strong&gt; dropdown button and picking the &lt;strong&gt;Freehand Draw&lt;/strong&gt; option. Once the freehand draw option is enabled, the contextual toolbar will be enabled to customize the stroke color and width.&lt;/p&gt;

&lt;p&gt;In the following code example, the &lt;strong&gt;freehandDraw&lt;/strong&gt; method is used to toggle the freehand drawings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;”padding-bottom:&lt;/span&gt; &lt;span class="err"&gt;10px;”&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;”e-btn”&lt;/span&gt; &lt;span class="err"&gt;(click)=”freehanddraw()”&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Freehand Draw&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;”wrapperDiv”&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;”width:550px;&lt;/span&gt; &lt;span class="err"&gt;height:350px;”&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ejs-imageeditor&lt;/span&gt; &lt;span class="err"&gt;(created)=”created()”&lt;/span&gt; &lt;span class="err"&gt;#ImageEditor&lt;/span&gt; &lt;span class="err"&gt;[toolbar]=’toolbarItems’&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/ejs-imageeditor&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

export class AppComponent {
 @ViewChild(‘ImageEditor’)
 public ImageEditorInstance!: ImageEditorComponent;
 public toolbarItems: string[] = [];
 public created = (): void =&amp;gt; {
  this.ImageEditorInstance.open(“http://localhost:6969/image/bridge.png”);
 }
 public freehanddraw = (): void =&amp;gt; {
  this.ImageEditorInstance.freeHandDraw(true);
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a_yvdHjq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Freehand-Drawing-Annotation-Feature-in-Angular-Image-Editor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a_yvdHjq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Freehand-Drawing-Annotation-Feature-in-Angular-Image-Editor.png" alt="Freehand Drawing Annotation Feature in Angular Image Editor" width="496" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Freehand Drawing Annotation Feature in Angular Image Editor&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;Zooming and panning an image&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Angular Image Editor allows users to zoom and pan an image. You can perform zooming and panning by either using the toolbar or the &lt;strong&gt;zoom and pan&lt;/strong&gt; method.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;toolbar&lt;/strong&gt; , we can perform zooming by clicking the &lt;strong&gt;Zoom In&lt;/strong&gt;  &lt;strong&gt;and&lt;/strong&gt;  &lt;strong&gt;Zoom Out ** buttons, which enable the **Pan&lt;/strong&gt; option in the toolbar.&lt;/p&gt;

&lt;p&gt;In the following code example, the &lt;strong&gt;zoomIn&lt;/strong&gt;** , **** zoomOut *&lt;em&gt;**,&lt;/em&gt;* and &lt;strong&gt;pan&lt;/strong&gt; methods are used to perform zooming in, zooming out, and panning the image, respectively.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"padding-bottom: 10px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="zoomIn()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Zoom In&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="zoomOut()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Zoom Out&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="pan()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Pan&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"wrapperDiv"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"width:550px; height:350px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ejs-imageeditor&lt;/span&gt; &lt;span class="err"&gt;(created)="created()"&lt;/span&gt; &lt;span class="err"&gt;#ImageEditor&lt;/span&gt; &lt;span class="err"&gt;[toolbar]='toolbarItems'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/ejs-imageeditor&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

export class AppComponent {
 @ViewChild('ImageEditor')
 public ImageEditorInstance!: ImageEditorComponent;
 public toolbarItems: string[] = [];
 public created = (): void =&amp;gt; {
  this.ImageEditorInstance.open("http://localhost:6969/image/bridge.png");
 }
 public zoomIn = (): void =&amp;gt; {
  this.ImageEditorInstance.zoom(0.1);
 }
 public zoomOut = (): void =&amp;gt; {
  this.ImageEditorInstance.zoom(-0.1);
 }
 public pan = (): void =&amp;gt; {
  this.ImageEditorInstance.pan(true);
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XS6VY75z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Zooming-and-Panning-Features-in-Angular-Image-Editor-1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XS6VY75z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Zooming-and-Panning-Features-in-Angular-Image-Editor-1.gif" alt="Zooming and Panning Features in Angular Image Editor" width="600" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Zooming and Panning Features in Angular Image Editor&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;Toolbar customization&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;You can customize the built-in toolbar using the &lt;strong&gt;toolbar&lt;/strong&gt; property. A contextual toolbar is enabled while inserting annotations. You can also customize the toolbar by using the &lt;strong&gt;toolbarUpdating&lt;/strong&gt; event.&lt;/p&gt;

&lt;p&gt;In the following code example, the annotate option is only enabled with text, rectangle, and ellipse options using the &lt;strong&gt;toolbar&lt;/strong&gt; property, and the contextual toolbar for the rectangle annotation is rendered with only stroke color by excluding fill color and stroke width using the &lt;strong&gt;toolbarUpdating&lt;/strong&gt; event.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;”wrapperDiv”&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;”width:550px;&lt;/span&gt; &lt;span class="err"&gt;height:350px;”&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ejs-imageeditor&lt;/span&gt; &lt;span class="err"&gt;(toolbarUpdating)=”toolbarUpdating($event)”&lt;/span&gt; &lt;span class="err"&gt;(created)=”created()”&lt;/span&gt; &lt;span class="err"&gt;#ImageEditor&lt;/span&gt; &lt;span class="err"&gt;[toolbar]=’toolbarItems’&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/ejs-imageeditor&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

export class AppComponent {
 @ViewChild(‘ImageEditor’)
 public ImageEditorInstance!: ImageEditorComponent;
 public toolbarItems: string[] = [‘Annotate’, ‘Text’, ‘Rectangle’, ‘Ellipse’];
 public created = (): void =&amp;gt; {
  this.ImageEditorInstance.open(“http://localhost:6969/image/bridge.png”);
 }
 public toolbarUpdating = (args: ToolbarEventArgs): void =&amp;gt; {
  if (args.toolbarType === ‘shapes’) {
   args.toolbarItems = [‘strokeColor’];
  }
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tMFB0QfG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Customizing-the-Toolbar-in-Angular-Image-Editor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tMFB0QfG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Customizing-the-Toolbar-in-Angular-Image-Editor.png" alt="Customizing the Toolbar in Angular Image Editor" width="539" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Customizing the Toolbar in Angular Image Editor&lt;p&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Toolbar template
&lt;/h4&gt;

&lt;p&gt;Also, users can replace the toolbar of the Image Editor with the user-specific UI using the &lt;strong&gt;toolbarTemplate&lt;/strong&gt; property.&lt;/p&gt;

&lt;p&gt;Refer to the following code example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"wrapperDiv"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"width: 550px; height: 350px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ejs-imageeditor&lt;/span&gt; &lt;span class="err"&gt;(created)="created()"&lt;/span&gt; &lt;span class="err"&gt;#ImageEditor&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;ng-template&lt;/span&gt; &lt;span class="err"&gt;#toolbarTemplate&lt;/span&gt; &lt;span class="err"&gt;let-data&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"padding: 10px; border-bottom: 1px solid darkgray;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="text()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Add Text&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="rectangle()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Rectangle&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"e-btn"&lt;/span&gt; &lt;span class="err"&gt;(click)="line()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Line&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/ng-template&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/ejs-imageeditor&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

export class AppComponent {
 @ViewChild('ImageEditor')
 public ImageEditorInstance!: ImageEditorComponent;
 public toolbarItems: string[] = ['Annotate', 'Text', 'Rectangle', 'Ellipse'];
 public created = (): void =&amp;gt; {
  this.ImageEditorInstance.open("http://localhost:6969/image/bridge.png");
 }
 public text = (): void =&amp;gt; {
  this.ImageEditorInstance.drawText(50, 50, 'Syncfusion');
 }
 public rectangle = (): void =&amp;gt; {
  this.ImageEditorInstance.drawRectangle(50, 300);
 }
 public line = (): void =&amp;gt; {
  this.ImageEditorInstance.drawLine(1000, 150);
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dL1gBQvM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Customizing-the-Toolbar-with-the-Toolbar-Template-Option-in-Angular-Image-Editor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dL1gBQvM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Customizing-the-Toolbar-with-the-Toolbar-Template-Option-in-Angular-Image-Editor.png" alt="Customizing the Toolbar with the Toolbar Template Option in Angular Image Editor" width="547" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Customizing the Toolbar with the Toolbar Template Option in Angular Image Editor&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;Adaptive and touch-friendly UI&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;By default, the Angular Image Editor adapts to all mobile devices based on the screen size. It is a touch-friendly component, so users can use their finger, a pen, or a mouse device on desktop and mobile devices to edit the image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_WQY2eXl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Adaptive-and-Touch-Friendly-UI-in-Angular-Image-Editor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_WQY2eXl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Adaptive-and-Touch-Friendly-UI-in-Angular-Image-Editor.png" alt="Adaptive and Touch-Friendly UI in Angular Image Editor" width="388" height="695"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Adaptive and Touch-Friendly UI in Angular Image Editor&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use it
&lt;/h2&gt;

&lt;p&gt;We have a set of resources for you, including our &lt;a href="https://ej2.syncfusion.com/angular/demos/#/bootstrap5/image-editor/default/"&gt;Angular Image Editor live demos&lt;/a&gt; and &lt;a href="https://ej2.syncfusion.com/angular/documentation/image-editor/getting-started/"&gt;documentation&lt;/a&gt; that explains our customization features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Thanks for reading! We hope you enjoyed this quick introduction to the design and features of our new &lt;a href="https://www.syncfusion.com/angular-components/angular-image-editor"&gt;Angular Image Editor&lt;/a&gt; component. If you would like to give it a try, please download the latest available version of Essential Studio, &lt;a href="https://www.syncfusion.com/forums/177858/essential-studio-2022-volume-3-main-release-v20-3-0-47-is-available-for-download"&gt;2022 Volume 3&lt;/a&gt; . Experience wonderful image editing with this component and provide your valuable feedback in the comments section below.&lt;/p&gt;

&lt;p&gt;You can also contact us through our &lt;a href="https://www.syncfusion.com/forums"&gt;support forums&lt;/a&gt;, &lt;a href="https://support.syncfusion.com/?_gl=1*hmo0hl*_ga*MTc0OTQ0NjYwNi4xNjU3ODgyMjE1*_ga_WC4JKKPHH0*MTY2NzE4NjU0OC40MjcuMS4xNjY3MTg3MjE1LjAuMC4w"&gt;support portal&lt;/a&gt;, or &lt;a href="https://www.syncfusion.com/feedback/"&gt;feedback portal&lt;/a&gt;. We are always happy to assist you!&lt;/p&gt;

&lt;h2&gt;
  
  
  Related blogs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/syncfusion-essential-studio-2022-volume-3-is-here.aspx"&gt;Syncfusion Essential Studio 2022 Volume 3 Is Here!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/whats-new-in-2022-volume-3-essential-js-2.aspx"&gt;What’s New in 2022 Volume 3: Essential JS 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/top-7-features-of-angular-14.aspx"&gt;Top 7 Features of Angular 14&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/angular-template-driven-vs-reactive-forms.aspx"&gt;Angular Template Driven vs. Reactive Forms&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>angular</category>
      <category>ui</category>
      <category>webdev</category>
      <category>whatsnew</category>
    </item>
    <item>
      <title>Deploying a .NET Core Application in Azure Kubernetes</title>
      <dc:creator>Rajeshwari Pandinagarajan</dc:creator>
      <pubDate>Thu, 10 Nov 2022 12:43:53 +0000</pubDate>
      <link>https://dev.to/syncfusion/deploying-a-net-core-application-in-azure-kubernetes-c5j</link>
      <guid>https://dev.to/syncfusion/deploying-a-net-core-application-in-azure-kubernetes-c5j</guid>
      <description>&lt;p&gt;In development, maintaining the release and deployment workflow is one of the most critical areas of a project. Therefore, many teams like to create an automated deployment workflow to manage their releases and production. Maintaining an automated deployment workflow can be complex, but it will save the team time and effort.&lt;/p&gt;

&lt;p&gt;Azure DevOps is one of the best platforms to create an automated CI/CD pipeline for an application, making this job easy. This article will discuss the steps to deploy a .NET Core application in Azure Kubernetes using the Azure DevOps Starter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://azure.microsoft.com/en-in/free/search/"&gt;Azure subscription&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/join"&gt;GitHub account&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dotnet.microsoft.com/en-us/download/dotnet/6.0"&gt;.NET 6 SDK&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://visualstudio.microsoft.com/vs/"&gt;Visual Studio 2022&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Are Containers and Container Orchestration?
&lt;/h2&gt;

&lt;p&gt;To understand the functionality of Kubernetes, you must first understand the concepts of containers and container orchestration.&lt;/p&gt;

&lt;p&gt;Containers are a form of the virtualized operating system. A container contains all essential executables, binary code, dependencies, and configuration files. A single container can execute anything from a microservice or software process to a considerably large application.&lt;/p&gt;

&lt;p&gt;Containers seem to be very scalable since they can be produced as needed. But the complexity increases when you must maintain hundreds or thousands of containers, and it becomes impossible to manage all their lifecycles. This is the situation in which container orchestration comes to the rescue.&lt;/p&gt;

&lt;p&gt;Containers’ maintenance, deployment, scaling, and networking can be automated using a container orchestration system. In addition, you can deploy the same application across multiple environments using container orchestration rather than having to redevelop or redesign it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Kubernetes?
&lt;/h2&gt;

&lt;p&gt;Kubernetes, also known as K8s, is a well-known open-source container management (orchestration) technology for automating applications’ deployment, scaling, and administration.&lt;/p&gt;

&lt;p&gt;The Kubernetes orchestration features allow the development of application services that span across many containers, the scheduling of containers in a cluster, the deployment of those containers, and control of the status of the containers over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Azure Kubernetes Service?
&lt;/h2&gt;

&lt;p&gt;Developed on top of the open-source Kubernetes technology, Azure Kubernetes Service (AKS) is a managed container orchestration service. You can use AKS to administer your hosted Kubernetes environment and easily launch, scale, and manage containerized apps.&lt;/p&gt;

&lt;p&gt;Through on-demand resource provisioning, updating, and scaling, AKS simplifies Kubernetes deployment and operation. It enables you to execute your applications in the cloud while eliminating the complexity and operational burden of Kubernetes management.&lt;/p&gt;

&lt;p&gt;In addition, your development and operations teams can collaborate on a single platform using AKS to build and deploy applications more efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Deploy a .NET Core Application in Azure Kubernetes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Create an Azure DevOps starter project.
&lt;/h3&gt;

&lt;p&gt;Sign in to your &lt;a href="https://azure.microsoft.com/en-us/get-started/azure-portal"&gt;Azure portal&lt;/a&gt;, click the &lt;strong&gt;Create a resource&lt;/strong&gt; option, and select &lt;strong&gt;DevOps Starter&lt;/strong&gt;. Then, you’ll be navigated to where you can create the DevOps Starter project. You have to complete four main steps to create the project.&lt;/p&gt;

&lt;h4&gt;
  
  
  a. Choose the runtime.
&lt;/h4&gt;

&lt;p&gt;Select the .NET runtime, as shown in the following figure, to run the ASP.NET Core application&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XsFpIokq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Choose-the-runtime..png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XsFpIokq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Choose-the-runtime..png" alt="Choose the .NET option" width="804" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  b. Choose the framework.
&lt;/h4&gt;

&lt;p&gt;Select ASP.NET Core as the framework for the runtime, as shown in the following figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--twMo6no4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/DevOps-Starter-UI-framework-manu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--twMo6no4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/DevOps-Starter-UI-framework-manu.png" alt="Choose ASP.NET Core as the framework" width="713" height="822"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  c. Choose the service.
&lt;/h4&gt;

&lt;p&gt;Then, select Kubernetes as the Azure service to deploy this application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wHJNmena--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Choose-the-service.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wHJNmena--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Choose-the-service.png" alt="Choose Kubernetes as the Azure Service" width="709" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  d. Create the project with the necessary configurations.
&lt;/h4&gt;

&lt;p&gt;Now, configure the Azure subscription and settings for the Kubernetes cluster. I will explain these configurations in the upcoming step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Configure the subscription and Azure Kubernetes service.
&lt;/h3&gt;

&lt;p&gt;We need to do a few configurations in the fourth part of creating the DevOps Starter project. We’ll use GitHub to create a repository for this project. As shown in the following figure, you need to authorize access to Azure for your GitHub personal account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Gc3877L2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Configure-the-subscription.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Gc3877L2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Configure-the-subscription.png" alt="Authorize access to Azure for your GitHub personal account" width="777" height="790"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are some other configurations to be done after authorizing the GitHub account. First, select the organization. Here, selects your GitHub account as a personal account. There is a field named Repository in the next figure: use it to add the name of the repository to be created in the GitHub account. This repository will be used to deploy the Azure Kubernetes service. Then, select the subscription for the DevOps Starter project. I will be using the &lt;strong&gt;Azure for Students&lt;/strong&gt; subscription for this demonstration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1TivzWq4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Picture26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1TivzWq4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Picture26.png" alt="Select the repository and subscription for the DevOps Starter project" width="770" height="681"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, create a new cluster or use one you have already created.&lt;/p&gt;

&lt;p&gt;If you are going to create a new cluster for this project, first add a name for the cluster. Then, select the location in which to create this service. After, select &lt;strong&gt;Standard_B2ms&lt;/strong&gt; , based on the B-series burstable VMs, as the virtual machine size. Use this VM to create the service for testing and demonstration purposes.&lt;/p&gt;

&lt;p&gt;Add additional settings if you need them according to your requirements or subscription plan. For example, if you are using a student subscription, you can adjust the settings as shown in the following image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HLcW1OJ8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Additional-Settings.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HLcW1OJ8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Additional-Settings.png" alt="Additional Settings dialog" width="795" height="1155"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The student subscription has some limitations. You have to set the node count to 1 and choose the &lt;strong&gt;Basic&lt;/strong&gt; service tier for the Container Registry SKU, as it is a cost-optimized tier suitable for learning and testing purposes.&lt;/p&gt;

&lt;p&gt;Finally, click &lt;strong&gt;Review+Create&lt;/strong&gt; to create the Azure DevOps Starter project, which will deploy the ASP.NET Core application in the Azure Kubernetes service. It will take a few minutes to create the project.&lt;/p&gt;

&lt;p&gt;After a few minutes, check your GitHub repository to make sure a new repository was created with the name you provided. You can see the workflow that has been automatically created for the GitHub action. It will be used to automate the CI/CD pipeline. You can also customize it if needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cbp_vJbt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Workflow-added-for-the-newly-created-GitHub-repository.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cbp_vJbt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Workflow-added-for-the-newly-created-GitHub-repository.png" alt="Workflow added for the newly created GitHub repository" width="880" height="261"&gt;&lt;/a&gt;&lt;br&gt;
The Azure resources and the status of the GitHub workflow will also be visible in the Azure portal after deploying it to the Kubernetes service, as shown in the following image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h9T2JJZg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Azure-portal-displaying-the-Azure-resources-and-the-status-of-the-GitHub-workflow.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h9T2JJZg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Azure-portal-displaying-the-Azure-resources-and-the-status-of-the-GitHub-workflow.png" alt="Azure portal displaying the Azure resources and the status of the GitHub workflow" width="880" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Furthermore, you can access the ASP.NET Core application using the external endpoint. There, you will see the application as shown in the following figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CTBJEWpn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/ASP.NET-Core-application.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CTBJEWpn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/ASP.NET-Core-application.png" alt="Accessing ASP.NET Core app using external endpoint" width="802" height="406"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3: Check the CI/CD pipeline.
&lt;/h3&gt;

&lt;p&gt;Now, check the CI/CD pipeline you created using the Azure DevOps Starter by cloning the ASP.NET Core project to your local machine with the help of the following git command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone &lt;span class="o"&gt;{&lt;/span&gt;git-repo-link&lt;span class="o"&gt;}&lt;/span&gt;.git 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the ease of viewing and editing files, let’s use Visual Studio Code 2022 to open the cloned application. Then, open the file named &lt;strong&gt;index.html&lt;/strong&gt; inside the &lt;strong&gt;Pages&lt;/strong&gt; folder.&lt;/p&gt;

&lt;p&gt;Then, you can edit it as you need. To demonstrate how the changes will activate the CI/CD pipeline, let’s change the&lt;/p&gt; div element as shown in the following code snippet.&lt;br&gt;

&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"content-body"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"success-text"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Success!&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"description line-1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;GitHub workflow has been successfully setup&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"description line-2"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Deploying DotNet Core Application In Azure Kubernetes&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Then, run and check it locally. After that, push the latest changes with a commit. First, add the changes to the staging area.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;git add 
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Second, commit the changes with an appropriate commit message into the local repository.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Update index.html"&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Third, push the commits to the GitHub repository.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main 
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;The GitHub action will trigger the build pipeline after successfully pushing the commits.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MDDStfiI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/GitHub-action-triggering-the-build-pipeline-after-pushing-the-commits.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MDDStfiI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/GitHub-action-triggering-the-build-pipeline-after-pushing-the-commits.png" alt="GitHub action triggering the build pipeline after pushing the commits" width="880" height="312"&gt;&lt;/a&gt;&lt;br&gt;
After completing the build process, it will deploy the application to the Azure Kubernetes service.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qPu8s6UJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Deploying-the-ASP.NET-Core-app-to-the-Azure-Kubernetes-service.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qPu8s6UJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Deploying-the-ASP.NET-Core-app-to-the-Azure-Kubernetes-service.png" alt="Deploying the ASP.NET Core app to the Azure Kubernetes service" width="880" height="312"&gt;&lt;/a&gt;&lt;br&gt;
You can check your Azure Kubernetes service after deploying the application to it by clicking the external endpoint, as shown in the following figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h4BBatsK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Click-on-the-external-endpoint-to-access-the-deployed-app.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h4BBatsK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Click-on-the-external-endpoint-to-access-the-deployed-app.png" alt="Click on the external endpoint to access the deployed app" width="880" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, you see that the latest version of the application was deployed successfully to the Azure Kubernetes service.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uZIARIks--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Deploying-ASP.NET-Core-app-in-Azure-Kubernetes.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uZIARIks--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Deploying-ASP.NET-Core-app-in-Azure-Kubernetes.png" alt="Deploying ASP.NET Core app in Azure Kubernetes" width="880" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This article discussed how to deploy an ASP.NET Core app to the Azure Kubernetes service using the Azure DevOps Starter, with the help of GitHub actions, to create an automated CI/CD pipeline for the app. This process eliminates the complexity of the deployment process significantly.&lt;/p&gt;

&lt;p&gt;I hope this article will help you in your next project.&lt;/p&gt;

&lt;p&gt;The Syncfusion &lt;a href="https://www.syncfusion.com/aspnet-core-ui-controls"&gt;ASP.NET Core UI control&lt;/a&gt; library, powered by &lt;a href="https://www.syncfusion.com/javascript-ui-controls"&gt;Essential JS 2&lt;/a&gt;, is the only suite you will ever need to build an app. It contains over 70 high-performance, lightweight, modular, and responsive UI controls in a single package. Use them to build stunning web apps!&lt;/p&gt;

&lt;p&gt;If you’re already a Syncfusion user, you can download the &lt;a href="https://www.syncfusion.com/account/downloads/studio/"&gt;product setup&lt;/a&gt; . If not, you can download a free &lt;a href="https://www.syncfusion.com/downloads"&gt;30-day trial &lt;/a&gt;to evaluate our products.&lt;/p&gt;

&lt;p&gt;You can contact us through our &lt;a href="https://www.syncfusion.com/forums"&gt;support forum&lt;/a&gt;, &lt;a href="https://support.syncfusion.com/"&gt;support portal&lt;/a&gt;, or &lt;a href="https://www.syncfusion.com/feedback/"&gt;feedback portal&lt;/a&gt;. As always, we are happy to assist you!&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

&lt;h2&gt;
  
  
  Related blogs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/handling-csv-files-in-asp-net-core-web-apis.aspx"&gt;Handling CSV Files in ASP.NET Core Web APIs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/integrate-blazor-webassembly-in-asp-net-core-application.aspx"&gt;Simple Steps to Integrate a Blazor WebAssembly Project with an Existing ASP.NET Core Application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/creating-an-asp-net-core-crud-web-api-with-dapper-and-postgresql.aspx"&gt;Creating an ASP.NET Core CRUD Web API with Dapper and PostgreSQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/authentication-support-in-syncfusion-asp-net-core-project-template-an-overview.aspx"&gt;Authentication Support in Syncfusion ASP.NET Core Project Template: An Overview&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>azure</category>
      <category>webdev</category>
    </item>
    <item>
      <title>JavaScript Debugging with VS Code and Chrome</title>
      <dc:creator>Rajeshwari Pandinagarajan</dc:creator>
      <pubDate>Thu, 10 Nov 2022 11:45:38 +0000</pubDate>
      <link>https://dev.to/syncfusion/javascript-debugging-with-vs-code-and-chrome-18ab</link>
      <guid>https://dev.to/syncfusion/javascript-debugging-with-vs-code-and-chrome-18ab</guid>
      <description>&lt;p&gt;Debugging is a vital part of identifying why your application is misbehaving. We feel great satisfaction once we find the bug in our code and fix it.&lt;/p&gt;

&lt;p&gt;No matter how skilled we get as developers, we still have to spend countless hours fixing bugs in our code. Thus, we should work on improving our debugging skills. If you work with JavaScript, you know it is not always cooperative. Fortunately, several JS debugging tools are accessible, usually making troubleshooting straightforward.&lt;/p&gt;

&lt;p&gt;This article will discuss how we can debug JavaScript using the simple and efficient tools in Visual Studio Code and Google Chrome.&lt;/p&gt;

&lt;h2&gt;
  
  
  Debugging Methods for JavaScript
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Breakpoints
&lt;/h3&gt;

&lt;p&gt;A breakpoint is where a line of code causes the debugger to pause JavaScript execution. We can examine current variables and run commands in the console while the code is paused. To put it another way, we can debug it. A list of breakpoints is always available in the right panel of Chrome DevTools. This is useful when we have a lot of breakpoints in different files.&lt;/p&gt;

&lt;h3&gt;
  
  
  Debugger Keyword
&lt;/h3&gt;

&lt;p&gt;In JavaScript, we can also use the &lt;strong&gt;debugger&lt;/strong&gt; keyword. The keyword causes code execution to pause. However, the browser will ignore such a command unless the development tools are open. See the following example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;writefunction&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; 
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Stop Executing write function!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;debugger&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// &amp;lt;-- the debugger stops here&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;helloWorld&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Backtracking
&lt;/h3&gt;

&lt;p&gt;Backtracking is the process of applying potential solutions to a problem in a JavaScript program. The procedure begins at the location where a specific error is discovered. From there, the complete source code is traced backward. The stages involved in this are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Identify the callers of each function.&lt;/li&gt;
&lt;li&gt;Determine whether any issues connected to that function have occurred there.&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;If not, you go back to the caller of that function. If it doesn’t work, you retreat and try again.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep repeating this until the error is removed and the expected output is obtained.&lt;/p&gt;

&lt;h3&gt;
  
  
  Strict Mode
&lt;/h3&gt;

&lt;p&gt;Using JavaScript’s strict mode makes writing standardized and readable JavaScript programs easier. We can put a program under a strict operating perspective by using strict mode. This strict context forbids specific actions and throws exceptions. It helps reduce bugs and keep the code clean. For example, JavaScript will throw an error in strict mode if we assign values to undeclared variables. The &lt;strong&gt;use strict&lt;/strong&gt; statement enables the strict mode.&lt;/p&gt;

&lt;h2&gt;
  
  
  Debugging JavaScript in VS Code
&lt;/h2&gt;

&lt;p&gt;VS Code provides easy and straightforward solutions for debugging. Visual Studio Code debuggers support many languages and platforms, which are either built-in or accessed by extensions. Let’s work on VS Code debugging with sample JavaScript code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hotels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;addHotel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hotel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;stars&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="nx"&gt;hotels&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;numType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;odd&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;numType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;even&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;hotels&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hotel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;stars&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;numType&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, you will notice some common bugs. Let’s ignore them for now and add some lines to test the code manually.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;addHotel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Kingsburry&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;5&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;addHotel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hilton&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;5&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;addHotel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Cinnamon Grand&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;5&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let’s use VS Code’s built-in  *&lt;em&gt;breakpoints *&lt;/em&gt; to break the program’s execution wherever we want to test when the bugs occur.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7L-BI8zh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Debugging-JavaScript-in-VS-Code.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7L-BI8zh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Debugging-JavaScript-in-VS-Code.png" alt="Using VS Code built-in breakpoints to debugging" width="741" height="522"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We discussed breakpoints. As you can see in the previous code, the red dots on the left side of VS Code editor are the breakpoints. You can add these by clicking on the panel to the left of the line numbers. Then, on the action bar, click the debug icon.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VS09qzU1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/click-the-debug-icon.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VS09qzU1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/click-the-debug-icon.png" alt="Click on the Debug icon" width="375" height="653"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take a look at the top section. You will notice a gear icon. Click it. A debug configuration file named &lt;strong&gt;launch.json&lt;/strong&gt; will be prompted. Update the configuration with reference to the following code to enable the VS Code debugger on &lt;strong&gt;App.js&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;configurations&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
   &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;node&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;request&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;launch&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Launch App&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;program&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;${workspaceFolder}&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;debugapp&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;src&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;App.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, click the play icon at the top of the debugger panel. A toolbar will appear at the top of the VS Code. The toolbar will contain several icons you can use to manipulate the debugging process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QTkaYLAo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/debugging-process.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QTkaYLAo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/debugging-process.png" alt="Toolbar in VS Code" width="776" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the previous screenshot, you’ll notice that the debugger has paused on your first breakpoint. To continue the session, press the play icon, which will cause execution to continue until it reaches the next breakpoint. Clicking the play icon again will finish the execution and end the debugging session. Let’s understand what the sections on the left pane provide us with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Variables&lt;/strong&gt; : displays the current scope’s local and global variables (at the point of execution).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch:&lt;/strong&gt; you can manually enter expressions for variables you want to monitor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Call Stack:&lt;/strong&gt; displays the highlighted code’s call stack.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breakpoints:&lt;/strong&gt; shows a list of files with breakpoints and their line numbers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Debug with Watch
&lt;/h3&gt;

&lt;p&gt;The watch panel tracks expressions in our code. The expression will be evaluated on whether it satisfies the criteria set here. You can watch a new expression by clicking the &lt;strong&gt;+&lt;/strong&gt; in the panel and entering an expression.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conditional Breakpoints
&lt;/h3&gt;

&lt;p&gt;Watching variables alone isn’t always enough. For example, say we wish to pause the debugging only if a specific requirement is met. Add a standard breakpoint to accomplish this. After adding the breakpoint, right-click on it, choose &lt;strong&gt;Edit Breakpoint&lt;/strong&gt; , and add the conditional statement expression for which you need to pause the debugging.&lt;/p&gt;

&lt;h3&gt;
  
  
  Call Stack
&lt;/h3&gt;

&lt;p&gt;The call stack helps trace exceptions and determine who called what. You can select an item listed in this pane to see who called it.&lt;/p&gt;

&lt;p&gt;Another tool in your VS Code toolbox for debugging is using the debug console. Although it may occasionally be excessive, it will frequently save you time when looking for bugs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Debugging JavaScript with Google Chrome
&lt;/h2&gt;

&lt;p&gt;The majority of IDEs and almost all recent browsers include debugging tools, which makes debugging much more straightforward. The browsers also allow for step-by-step code tracing to pinpoint the exact cause of the error. Google Chrome, which many developers use, provides us with debugging solutions for JavaScript. In addition, Chrome provides debugger extensions for VS Code and Chrome DevTools. Chrome DevTools comes built-in with the Google Chrome browser.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chrome Debugger for VS Code
&lt;/h3&gt;

&lt;p&gt;Chrome’s debugger helps debug client-side JavaScript code, which runs in Google Chrome straight from VS Code. The Chrome debugger is an extension that needs to be installed in VS Code.&lt;/p&gt;

&lt;p&gt;The debugger usually connects to Chrome over its Chrome Debugger Protocol, where files loaded in the browser are mapped to the files opened in VS Code. You can set breakpoints directly in the source code and set up variables to watch along with the entire call stack when debugging without leaving the editor.&lt;/p&gt;

&lt;p&gt;Due to the inclusion of a JavaScript debugger in Visual Studio Code, this extension is no longer supported (deprecated) there. The JavaScript debugger fixes problems with Node.js, Chrome, Edge, WebView2, VS Code extensions, and other programs. You can remove the Chrome debugger extension without risk and still have access to the required capabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chrome Developer Tools
&lt;/h3&gt;

&lt;p&gt;The finest debugging tool is already included with your Chrome browser, whether you’re working with Angular, React, or Vue applications. The Google Chrome browser includes developer tools (also known as DevTools) that allow developers to edit code directly in the browser, add breakpoints to detect issues, and debug their code more quickly.&lt;/p&gt;

&lt;p&gt;To open the DevTools Elements panel, press &lt;strong&gt;Command + Option + C&lt;/strong&gt; on a Mac or &lt;strong&gt;CTRL + SHIFT + C&lt;/strong&gt; on any other operating system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WRYdPmB1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Debugging-using-Chrome-Developer-Tools.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WRYdPmB1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Debugging-using-Chrome-Developer-Tools.png" alt="Debugging using Chrome Developer Tools" width="880" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s review some practical strategies for debugging your code more efficiently with DevTools.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding Breakpoints in DevTools
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;Sources&lt;/strong&gt; tab in the DevTools.&lt;/li&gt;
&lt;li&gt;In the navigation panel on the left side, select the &lt;strong&gt;.js&lt;/strong&gt;  file. The code of the selected .js file will be displayed in the middle panel.&lt;/li&gt;
&lt;li&gt;Right-click on the line where you want to add the breakpoint. Then, in the dropdown list, select &lt;strong&gt;Add breakpoint&lt;/strong&gt;. &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s3OGKxxQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Select-Add-breakpoint-option.png" alt="Select Add breakpoint option" width="880" height="411"&gt;
A blue color breakpoint will be displayed, as shown in the following image. &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---ErCuCJ0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Picture12.png" alt="Breakpoint in the JavaScript code" width="841" height="660"&gt;
When we rerun the execution, the execution will pause at the breakpoint. &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wsuj3DOt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Code-execution-paused-at-the-breakpoint.png" alt="Code execution paused at the breakpoint" width="880" height="403"&gt;
Instead of &lt;strong&gt;console.log(something)&lt;/strong&gt; and reloading pages, pause and inspect the code. It’s a more productive way to debug. When everything appears in order, click the resume button on the page to proceed with the execution. DevTools allows you to add a variety of breakpoints. 
The following image summarizes all the available breakpoint types. &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b5ZgDkk6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Picture14.png" alt="Breakpoints and their use cases" width="880" height="604"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Create/Save/Run Snippets
&lt;/h3&gt;

&lt;p&gt;Utilizing snippets is an additional effective method for debugging. Using snippets, you may quickly run and reuse scripts in any area of your app.&lt;/p&gt;

&lt;p&gt;To add a snippet:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select &lt;strong&gt;Snippets&lt;/strong&gt; in the left panel. &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oyqzqouH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Picture15.png" alt="Select Snippets in the left panel" width="828" height="541"&gt;
&lt;/li&gt;
&lt;li&gt;Click *&lt;em&gt;New Snippet *&lt;/em&gt; in the left panel and write your code in the middle panel. &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pujXyyF9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Picture16.png" alt="Click New Snippet in the left panel and write your code in the middle panel" width="568" height="150"&gt;
&lt;/li&gt;
&lt;li&gt;Save your snippet with keyboard commands (CTRL+C on Windows).&lt;/li&gt;
&lt;li&gt;To run this code, right-click on the snippet and select &lt;strong&gt;Run&lt;/strong&gt;. &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g-e0T6j5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Picture17.png" alt="Select the Run option" width="291" height="206"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  DevTools Call Stack
&lt;/h3&gt;

&lt;p&gt;You can also use DevTools to view the call stack. This is helpful when you’re troubleshooting errors and you need to keep track of changes to the call stack due to many asynchronous methods. Expand the Call Stack panel in the right panel to examine all the current functions in the call stack. This is available in the Sources tab of the DevTools.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NrGeHteT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Source-tab-in-DevTools.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NrGeHteT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Source-tab-in-DevTools.png" alt="Source tab in DevTools" width="880" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Changes to Variables
&lt;/h3&gt;

&lt;p&gt;Suppose you have a bug that does not return the correct value for a variable, and you want to check its value at a specific point in a function:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add a breakpoint.&lt;/li&gt;
&lt;li&gt;Navigate to the appropriate panel.&lt;/li&gt;
&lt;li&gt;Expand the &lt;strong&gt;Scope&lt;/strong&gt; to see the value of the variable.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can see that this panel contains a lot of helpful information for troubleshooting bugs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aM4x4kCQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Options-available-to-troubleshoot-bugs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aM4x4kCQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Options-available-to-troubleshoot-bugs.png" alt="Options available to troubleshoot bugs" width="880" height="229"&gt;&lt;/a&gt;You can edit the variables by double-clicking them to test the function with different values.&lt;/p&gt;

&lt;h3&gt;
  
  
  Blackboxing
&lt;/h3&gt;

&lt;p&gt;At times, you might need to prevent some scripts from running while debugging. You can black box them in DevTools rather than commenting them out in your code. Click on the script file you want to ignore in the Sources tab’s left panel. To add a script to the ignore list, right-click the code in the middle panel and choose &lt;strong&gt;Add script to ignore list&lt;/strong&gt;. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q3vFI_v4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Picture20.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q3vFI_v4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Picture20.png" alt="Choose Add Script to ignore list" width="839" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since the DevTools won’t execute this script, you can concentrate more on studying the flawed code and identifying the bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Having a Debugger Tool
&lt;/h2&gt;

&lt;p&gt;DevTools in Google Chrome is a terrific resource for debugging, enhancing network speed, viewing your site in various screen sizes and resolutions, and learning where you can improve the code. Even if Google Chrome is not your regular browser, installing it is highly recommended so you can use these features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Saves time:&lt;/strong&gt;  The debugger helps enhance the speed of software development by providing many tools to keep track of the code and ensure the application’s behavior.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reports errors:&lt;/strong&gt;  As soon as an error occurs, the debugger tool reports it. This makes the software development process less stressful and enables the early detection of errors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Straightforward interpretations:&lt;/strong&gt;  By providing more details on data structures, the debugger tools enable simple interpretations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug-free software:&lt;/strong&gt; It assists developers in discovering software bugs so that they can be repaired before the software’s release.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap Up
&lt;/h2&gt;

&lt;p&gt;In this article, we went through the different techniques of debugging JavaScript code and the tools used in VS Code and Google Chrome.&lt;/p&gt;

&lt;p&gt;VS Code’s debugging tools and Chrome’s DevTools offer significant functionality for debugging JavaScript. You’ll become a more effective debugger once you’ve mastered these tools and your days of unending &lt;strong&gt;console.log()&lt;/strong&gt; will be over.&lt;/p&gt;

&lt;p&gt;Thanks for reading. I hope this article helped with the critical concepts of debugging JavaScript.&lt;/p&gt;

&lt;p&gt;Syncfusion’s &lt;a href="https://www.syncfusion.com/javascript-ui-controls"&gt;Essential JS 2&lt;/a&gt; is the only suite you will need to build an app. It contains over 65 high-performance, lightweight, modular, and responsive UI components in a single package. Download a &lt;a href="https://www.syncfusion.com/downloads/essential-js2"&gt;free trial&lt;/a&gt; to evaluate it today.&lt;/p&gt;

&lt;p&gt;If you have any questions or comments, you can contact us through our &lt;a href="https://www.syncfusion.com/forums"&gt;support forums&lt;/a&gt;, &lt;a href="https://support.syncfusion.com/"&gt;support portal&lt;/a&gt;, or &lt;a href="https://www.syncfusion.com/feedback/"&gt;feedback portal&lt;/a&gt;. We are always happy to assist you!&lt;/p&gt;

&lt;h2&gt;
  
  
  Related blogs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/what-is-webpack-module-federation-and-why-does-it-matter.aspx"&gt;What Is Webpack Module Federation and Why Does It Matter?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/skeleton-loading-indicator-in-essential-js-2-datagrid.aspx"&gt;Introducing Skeleton Loading Indicator in Syncfusion Essential JS 2 DataGrid&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/javascript-string-manipulation-techniques-every-developer-should-know.aspx"&gt;JavaScript String Manipulation Techniques Every Developer Should Know&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/javascript-api-mocking-techniques.aspx"&gt;JavaScript API Mocking Techniques&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/optimize-next-js-app-bundle-improve-its-performance.aspx"&gt;Optimize Next.js App Bundle and Improve Its Performance&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>vscode</category>
      <category>debugging</category>
    </item>
    <item>
      <title>Syncfusion Mobile and Desktop Controls are Now Compatible with .NET 7</title>
      <dc:creator>Rajeshwari Pandinagarajan</dc:creator>
      <pubDate>Wed, 09 Nov 2022 11:00:13 +0000</pubDate>
      <link>https://dev.to/syncfusion/syncfusion-mobile-and-desktop-controls-are-now-compatible-with-net-7-2lba</link>
      <guid>https://dev.to/syncfusion/syncfusion-mobile-and-desktop-controls-are-now-compatible-with-net-7-2lba</guid>
      <description>&lt;p&gt;We have released a &lt;a href="https://www.syncfusion.com/forums/178709/essential-studio-2022-volume-3-service-pack-release-v20-3-0-56-is-available-for-download"&gt;service pack for our 2022 Volume 3 release&lt;/a&gt; of Essential Studio. We are excited to announce that with this service pack release, our mobile and desktop controls for &lt;a href="https://www.syncfusion.com/maui-controls"&gt;.NET MAUI&lt;/a&gt;, &lt;a href="https://www.syncfusion.com/wpf-controls"&gt;WPF&lt;/a&gt;, &lt;a href="https://www.syncfusion.com/winui-controls"&gt;WinUI&lt;/a&gt;, and &lt;a href="https://www.syncfusion.com/winforms-ui-controls"&gt;WinForms&lt;/a&gt; are now compatible with .NET 7.0.&lt;/p&gt;

&lt;p&gt;Our .NET MAUI components are compatible with the following development environments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Microsoft Visual Studio 2022 17.4.0 Preview 6.0 (.NET MAUI version 6.0.541) with .NET 7.0.&lt;/li&gt;
&lt;li&gt;Microsoft Visual Studio 2022 17.4.0 Preview 6.0 (.NET MAUI version 6.0.541) with .NET 6.0.&lt;/li&gt;
&lt;li&gt;Microsoft Visual Studio 2022 17.4.0 (.NET MAUI version 6.0.541) with .NET 6.0.&lt;/li&gt;
&lt;li&gt;Visual Studio 2022 for Mac 17.4 Preview with .NET 6.0.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can create projects targeting .NET 7.0 and reference our service pack NuGet packages either from nuget.org, or you can use the installer available from the &lt;a href="https://www.syncfusion.com/maui-controls"&gt;Syncfusion&lt;/a&gt; website. Depending on your license, you can download the licensed installer or try our trial installer.&lt;/p&gt;

&lt;p&gt;As you may know, &lt;a href="https://www.syncfusion.com/blogs/post/syncfusion-sponsors-net-conf-2022.aspx"&gt;Syncfusion is sponsoring the upcoming .NET Conf 2022&lt;/a&gt;, a free virtual event on November 8–10. The focus of this virtual event is the launch of .NET 7, including updates for .NET MAUI.&lt;/p&gt;

&lt;p&gt;.NET MAUI is new, and it has all the right tool sets for building enterprise-quality applications. The top priority for this release of .NET MAUI is increasing the overall quality and reliability of the toolkit.&lt;/p&gt;

&lt;p&gt;Referencing the &lt;a href="https://devblogs.microsoft.com/dotnet/announcing-dotnet-7-rc-1/"&gt;blog announcing .NET 7 RC1&lt;/a&gt;, we encourage you to try the listed features using our controls in .NET 7.0 and let us know how it goes.&lt;/p&gt;

&lt;p&gt;If you have any questions or comments, you can reach us through our &lt;a href="https://www.syncfusion.com/forums"&gt;support forum&lt;/a&gt;, &lt;a href="https://support.syncfusion.com/"&gt;support portal&lt;/a&gt;, or &lt;a href="https://www.syncfusion.com/feedback/"&gt;feedback portal&lt;/a&gt;. We are always happy to assist you!&lt;/p&gt;

&lt;h2&gt;
  
  
  Related blogs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/syncfusion-essential-studio-2022-volume-3-is-here.aspx"&gt;Syncfusion Essential Studio 2022 Volume 3 Is Here!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/whats-new-in-net-maui-2022-volume-3.aspx"&gt;What’s New in .NET MAUI: 2022 Volume 3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/whats-new-in-2022-volume-3-winui-and-wpf.aspx"&gt;What’s New in 2022 Volume 3: WinUI and WPF&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/design-office-inspired-simplified-ribbon-in-winforms.aspx"&gt;Design Office-Inspired Simplified Ribbon in WinForms&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>maui</category>
      <category>csharp</category>
      <category>dotnet</category>
      <category>wpf</category>
    </item>
    <item>
      <title>Introducing the New Angular Mention Component</title>
      <dc:creator>Rajeshwari Pandinagarajan</dc:creator>
      <pubDate>Tue, 08 Nov 2022 11:00:03 +0000</pubDate>
      <link>https://dev.to/syncfusion/introducing-the-new-angular-mention-component-bh5</link>
      <guid>https://dev.to/syncfusion/introducing-the-new-angular-mention-component-bh5</guid>
      <description>&lt;p&gt;We are happy to introduce the new &lt;a href="https://www.syncfusion.com/angular-components/angular-mention"&gt;Angular Mention&lt;/a&gt; component in our &lt;a href="https://www.syncfusion.com/forums/177858/essential-studio-2022-volume-3-main-release-v20-3-0-47-is-available-for-download"&gt;2022 Volume 3&lt;/a&gt; release. It provides one of the most anticipated features for all our editor components.&lt;/p&gt;

&lt;p&gt;Let’s explore the Angular Mention component, its UI design, and its features with code examples.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;The new Angular Mention component provides @mention and #hashtag functionality for any editor control. It lets users tag or select a user or group name from a suggestion list. It has several out-of-the-box features such as data binding, grouping, UI customization, accessibility, and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key features
&lt;/h2&gt;

&lt;p&gt;The following are the key features of the Angular Mention component:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Data binding.&lt;/li&gt;
&lt;li&gt;
Mention character customization.&lt;/li&gt;
&lt;li&gt;
Highlighting for matched text.&lt;/li&gt;
&lt;li&gt;
Icons paired with suggestion list items.&lt;/li&gt;
&lt;li&gt;
Categorizable suggestion lists.&lt;/li&gt;
&lt;li&gt;
Sortable suggestion lists.&lt;/li&gt;
&lt;li&gt;
UI customization with templates.&lt;/li&gt;
&lt;li&gt;
Web accessibility and keyboard support.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;Data binding&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Angular Mention component supports different types of data sources, such as arrays of primitive data, JSON data collections, and remote data sources using adapters such as OData, OData V4, URLs, JSON, and web APIs.&lt;/p&gt;

&lt;p&gt;The following code example shows how to bind a string of array data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[app.component.ts]&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;angular&lt;/span&gt;&lt;span class="sr"&gt;/core’&lt;/span&gt;&lt;span class="err"&gt;;
&lt;/span&gt;
&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
 &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;root&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="c1"&gt;// Specifies the template string for the Mention component.&lt;/span&gt;
 &lt;span class="na"&gt;Template&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&amp;lt;div id=”commentBox” placeholder=”Type @ and tag user” &amp;gt;&amp;lt;/div&amp;gt;&amp;lt;ejs-mention [dataSource]=’userData’ [target]=’commentTarget’&amp;gt;&amp;lt;/ejs-mention&amp;gt;`&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;AppComponent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
 &lt;span class="c1"&gt;// Defines the array of data.&lt;/span&gt;
 &lt;span class="nx"&gt;Public&lt;/span&gt; &lt;span class="nx"&gt;userData&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;Selma&lt;/span&gt; &lt;span class="nx"&gt;Rose&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;Russo&lt;/span&gt; &lt;span class="nx"&gt;Kay&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;Camden&lt;/span&gt; &lt;span class="nx"&gt;Kate&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;Garth&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;Margaret&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;Robert&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;Albert&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;Michael&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
 &lt;span class="c1"&gt;// Sets target editor or editable element.&lt;/span&gt;
 &lt;span class="nx"&gt;Public&lt;/span&gt; &lt;span class="nx"&gt;commentTarget&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="err"&gt;‘#&lt;/span&gt;&lt;span class="nx"&gt;commentBox&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;a&gt;Customize mention character&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;You can easily customize the mentioned character using the &lt;a href="https://ej2.syncfusion.com/angular/documentation/api/mention/#mentionchar"&gt;mentionChar&lt;/a&gt; property. Then, you can show or hide the mentioned character while tagging or selecting items by using the &lt;a href="https://ej2.syncfusion.com/angular/documentation/api/mention/#showmentionchar"&gt;showMentionChar&lt;/a&gt; property. You can also use multiple mention characters that correspond to different suggestion lists within a single editor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IkiVqiEf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Customizing-the-Mention-Character-in-the-Angular-Mention-Component.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IkiVqiEf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Customizing-the-Mention-Character-in-the-Angular-Mention-Component.png" alt="Customizing the Mention Character in the Angular Mention Component" width="700" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Customizing the Mention Character in the Angular Mention Component&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; For more details, refer to our &lt;a href="https://ej2.syncfusion.com/angular/demos/#/bootstrap5/mention/multiple-list"&gt;multiple suggestion list example for the Angular Mention component.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;Highlight the matched text&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Angular Mention component has the option to configure different visual appearances for the matching text of each suggestion through the &lt;a href="https://ej2.syncfusion.com/angular/documentation/api/mention/#highlight"&gt;highlight&lt;/a&gt; property.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2B9OTZcA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Highlighting-the-Matched-Text-in-the-Angular-Mention-Component.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2B9OTZcA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Highlighting-the-Matched-Text-in-the-Angular-Mention-Component.png" alt="Highlighting the Matched Text in the Angular Mention Component" width="700" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Highlighting the Matched Text in the Angular Mention Component&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;Suggestion list items with icons&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Angular Mention component comes with built-in icon support for visual representations of the suggestion items. To enable this feature, configure the CSS class name through the data source and map the &lt;a href="https://ej2.syncfusion.com/angular/documentation/api/mention/fieldSettingsModel/#iconcss"&gt;fields.iconCss&lt;/a&gt; property for each item.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a8kKIB-l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Angular-Mention-Component-Showing-the-Suggestion-List-Items-with-Icons.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a8kKIB-l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Angular-Mention-Component-Showing-the-Suggestion-List-Items-with-Icons.png" alt="Angular Mention Component Showing the Suggestion List Items with Icons" width="700" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Angular Mention Component Showing the Suggestion List Items with Icons&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;Categorize the suggestions list items&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;You can organize suggestions into groups based on different categories. The category for each list item can be mapped through the &lt;a href="https://ej2.syncfusion.com/angular/documentation/api/mention/fieldSettingsModel/#groupby"&gt;groupBy&lt;/a&gt; field in the data source.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PhAzaNf5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Categorizing-the-Suggestion-List-Items-in-the-Angular-Mention-Component.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PhAzaNf5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Categorizing-the-Suggestion-List-Items-in-the-Angular-Mention-Component.png" alt="Categorizing the Suggestion List Items in the Angular Mention Component" width="700" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Categorizing the Suggestion List Items in the Angular Mention Component&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;Sorting the suggestions list items&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Angular Mention component has built-in support to display the suggestion list items in ascending or descending order using the &lt;a href="https://ej2.syncfusion.com/angular/documentation/api/mention#sortorder"&gt;sortOrder&lt;/a&gt; property.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;UI customization with templates&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;To create custom user experiences, use the template option in the Angular Mention component. You can customize the suggestion list items, selection display text, no-record display, and data loading spinner using the template support.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---YC0Upxh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Customizing-the-Angular-Mention-Component-UI-with-Templates.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---YC0Upxh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/11/Customizing-the-Angular-Mention-Component-UI-with-Templates.png" alt="Customizing the Angular Mention Component UI with Templates" width="700" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;Customizing the Angular Mention Component UI with Templates&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; For more details, refer to the &lt;a href="https://ej2.syncfusion.com/angular/demos/#/bootstrap5/mention/template"&gt;example for the Angular Mention component template&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a&gt;Web accessibility and keyboard support&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The Angular Mention component supports keyboard interaction and web accessibility standards based on the &lt;a href="https://www.w3.org/TR/wai-aria-practices/"&gt;WAI-ARIA &lt;/a&gt;specifications, roles, and states. The supported keyboard shortcuts are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Down arrow&lt;/strong&gt; : After the pop-up list opens, press the Down arrow key to move to the next list item. If it is the last item, then the selection will focus on the first item in the list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Up arrow&lt;/strong&gt; : After the pop-up list opens, press the Up arrow key to move to the previous list item. If it is the first item, then the selection will focus on the last item in the list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Home/Page up:&lt;/strong&gt;  Moves to the first item in the list after the pop-up list opens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;End/Page down&lt;/strong&gt; : Moves to the last item in the list after the pop-up list opens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Esc&lt;/strong&gt; : Closes the pop-up list if it is in the open state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enter&lt;/strong&gt; : Selects the focused item, and when the pop-up list is in an open state it closes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tab&lt;/strong&gt; : Focuses on the next TabIndex element on the page when the pop-up list is closed. Otherwise, inserts the selected pop-up list item and close the pop-up list.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How to use it&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;You can include the Mention component in the rich text editor, text area, text box, or other editable components. It has a huge set of resources for developers, including source code on &lt;a href="https://github.com/syncfusion/ej2-angular-ui-components/tree/master/components/dropdowns/src/mention"&gt;GitHub,&lt;/a&gt; &lt;a href="https://ej2.syncfusion.com/angular/demos/#/bootstrap5/mention/default"&gt;live demos&lt;/a&gt;, and thoroughly explained customization features in its &lt;a href="https://ej2.syncfusion.com/angular/documentation/mention/getting-started/"&gt;documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Supported platforms&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The Mention component is also available on the following platforms.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Platform&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Live demos&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Documentation&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a title="React UI components" href="https://www.syncfusion.com/react-components" rel="noopener"&gt;React&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a title="Live demo of React Mention component" href="https://ej2.syncfusion.com/react/demos/#/bootstrap5/mention/default" rel="noopener"&gt;React Mention demos&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a title="Getting started with React Mention component" href="https://ej2.syncfusion.com/react/documentation/mention/getting-started/" rel="noopener"&gt;Getting started with React Mention&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a title="Vue UI components" href="https://www.syncfusion.com/vue-components" rel="noopener"&gt;Vue&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a title="Live demo of Vue Mention component" href="https://ej2.syncfusion.com/vue/demos/#/bootstrap5/mention/default.html" rel="noopener"&gt;Vue Mention demos&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a title="Getting started with Vue Mention component" href="https://ej2.syncfusion.com/vue/documentation/mention/getting-started/" rel="noopener"&gt;Getting started with Vue Mention&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a title="JavaScript UI components" href="https://www.syncfusion.com/javascript-ui-controls" rel="noopener"&gt;JavaScript&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a title="Live demo of JavaScript Mention component" href="https://ej2.syncfusion.com/demos/#/bootstrap5/mention/default.html" rel="noopener"&gt;JavaScript Mention demos&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a title="Getting started with JavaScript Mention component" href="https://ej2.syncfusion.com/documentation/mention/getting-started/" rel="noopener"&gt;Getting started with JavaScript Mention&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a title="ASP.NET Core UI controls" href="https://www.syncfusion.com/aspnet-core-ui-controls" rel="noopener"&gt;ASP.NET Core&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a title="Live demo of ASP.NET Core Mention control" href="https://ej2.syncfusion.com/aspnetcore/Mention/Default#/fluent" rel="noopener"&gt;ASP.NET Core Mention demos&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a title="Getting started with ASP.NET Core Mention component" href="https://ej2.syncfusion.com/aspnetcore/documentation/mention/getting-started" rel="noopener"&gt;Getting started with ASP.NET Core Mention&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a title="ASP.NET MVC UI controls" href="https://www.syncfusion.com/aspnet-mvc-ui-controls" rel="noopener"&gt;ASP.NET MVC&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a title="Live demo of ASP.NET MVC Mention control" href="https://ej2.syncfusion.com/aspnetmvc/Mention/DefaultFunctionalities#/fluent" rel="noopener"&gt;ASP.NET MVC Mention demos&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a title="Getting started with ASP.NET MVC Mention control" href="https://ej2.syncfusion.com/aspnetmvc/documentation/mention/getting-started" rel="noopener"&gt;Getting started with ASP.NET MVC Mention&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Thanks for reading! In this blog, we have seen the features of the new &lt;a href="https://www.syncfusion.com/angular-components/angular-mention"&gt;Angular Mention&lt;/a&gt; component that rolled out in our &lt;a href="https://www.syncfusion.com/forums/177858/essential-studio-2022-volume-3-main-release-v20-3-0-47-is-available-for-download"&gt;2022 Volume 3&lt;/a&gt; release. These features are also listed on our &lt;a href="https://help.syncfusion.com/common/essential-studio/release-notes/v20.3.0.47"&gt;Release Notes&lt;/a&gt; and the &lt;a href="https://www.syncfusion.com/products/whatsnew"&gt;What’s New&lt;/a&gt; pages. Try out the component and share your feedback as comments on this blog.&lt;/p&gt;

&lt;p&gt;You can also reach us through our &lt;a href="https://www.syncfusion.com/forums"&gt;support forums&lt;/a&gt;, &lt;a href="https://support.syncfusion.com/"&gt;support portal&lt;/a&gt;, or &lt;a href="https://www.syncfusion.com/feedback/"&gt;feedback portal&lt;/a&gt;. We are always happy to assist you!&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Related blogs&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/top-7-features-of-angular-14.aspx"&gt;Top 7 Features of Angular 14&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/whats-new-in-2022-volume-3-essential-js-2.aspx"&gt;What’s New in 2022 Volume 3: Essential JS 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/syncfusion-essential-studio-2022-volume-3-is-here.aspx"&gt;Syncfusion Essential Studio 2022 Volume 3 Is Here!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/skeleton-loading-indicator-in-essential-js-2-datagrid.aspx"&gt;Introducing Skeleton Loading Indicator in Syncfusion Essential JS 2 DataGrid&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>angular</category>
      <category>webdev</category>
      <category>whatsnew</category>
    </item>
    <item>
      <title>Handling CSV Files in ASP.NET Core Web APIs</title>
      <dc:creator>Rajeshwari Pandinagarajan</dc:creator>
      <pubDate>Wed, 02 Nov 2022 10:40:14 +0000</pubDate>
      <link>https://dev.to/syncfusion/handling-csv-files-in-aspnet-core-web-apis-4jj7</link>
      <guid>https://dev.to/syncfusion/handling-csv-files-in-aspnet-core-web-apis-4jj7</guid>
      <description>&lt;p&gt;Handling CSV files can be essential for developers in applications using ASP.NET Core Web APIs. There are many approaches to handling CSV, and &lt;strong&gt;CSVHelper&lt;/strong&gt; is a handy NuGet package for doing so easily. This article will discuss how to handle CSV files using the CSVHelper library in an ASP.NET Core Web API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before creating the application, you need to have the following tools installed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://visualstudio.microsoft.com/vs/"&gt;Visual Studio 2022&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dotnet.microsoft.com/en-us/download/dotnet/6.0"&gt;.NET SDK 6.0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is CSVHelper?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://joshclose.github.io/CsvHelper/"&gt;CSVHelper&lt;/a&gt; is an open-source .NET library for reading and writing CSV files. It is speedy, flexible, and easy to use. We can read and write CSV files using the model class. Also, some configurations can map the model class with the headers of the CSV files, if required.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating the ASP.NET Core Web API application
&lt;/h2&gt;

&lt;p&gt;First, create an ASP.NET Core Web API project using Visual Studio 2022. To do so, open Visual Studio and select a new project with an ASP.NET Core Web API template, as in the following figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m66jvACl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Creating-the-ASP.NET-Core-Web-API-application-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m66jvACl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Creating-the-ASP.NET-Core-Web-API-application-1.png" alt="Select ASP.NET Core Web API option" width="880" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, select the .NET 6 framework for this project, like in the next figure. Then, create the project and run it to check if everything is working. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--w6YAEH60--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Selecting-.NET-6-framework-for-the-project.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w6YAEH60--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Selecting-.NET-6-framework-for-the-project.png" alt="Select .NET 6 framework for the project" width="880" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing the CSVHelper package
&lt;/h2&gt;

&lt;p&gt;Then, to install the CSVHelper package in our project, click right on the project and select the &lt;strong&gt;Manage NuGet Packages…&lt;/strong&gt; option, as shown in the figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NdDANtCE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Installing-the-CSVHelper-package.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NdDANtCE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Installing-the-CSVHelper-package.png" alt="Select the Manage NuGet Packages option" width="671" height="751"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Then, navigate to the &lt;strong&gt;Browse&lt;/strong&gt; tab in the NuGet section, search for the CSVHelper version 28.0.1 package, and install it, like in the following figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qxnnia7_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Navigating-to-the-Browse-tab-in-the-NuGet-section.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qxnnia7_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Navigating-to-the-Browse-tab-in-the-NuGet-section.png" alt="Navigating to the Browse tab and install the CsvHelper" width="880" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, create a model class named &lt;strong&gt;Employee&lt;/strong&gt;. This class is used to read and write CSV files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Employee&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;Id&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;Age&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;City&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;JobPosition&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; We have created the Employee model class only for demonstration purposes. You can use any model class you need for your project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reading CSV files using CSVHelper
&lt;/h2&gt;

&lt;p&gt;Now, we create a service to read CSV files using the CSVHelper NuGet package. For this, create a folder named &lt;strong&gt;Services&lt;/strong&gt; in the root directory. Then, create an interface named &lt;strong&gt;ICSVService&lt;/strong&gt; , similar to the next sample.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;ICSVService&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IEnumerable&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ReadCSV&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;Stream&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a class named CSVService, inherited from ICSVService.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CSVService&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ICSVService&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IEnumerable&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ReadCSV&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;Stream&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;StreamReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;CsvReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;CultureInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InvariantCulture&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;records&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetRecords&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;records&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have used a method-level generic to deal with the model class. We can use this method with any model class to read CSV files. We have also passed the file stream as a parameter to the &lt;strong&gt;ReadCSV&lt;/strong&gt; method. The &lt;a href="https://docs.microsoft.com/en-us/dotnet/api/system.io.streamreader?view=net-6.0"&gt;StreamReader&lt;/a&gt; reads the text and characters from the file stream. Later, we used &lt;strong&gt;CsvReader&lt;/strong&gt; to transfer the content read from &lt;strong&gt;StreamReader&lt;/strong&gt; into the memory. Then, the &lt;strong&gt;GetRecords&lt;/strong&gt; method returned the data of CSV files. We don’t need any configurations if our class property names match the headers of CSV files.&lt;/p&gt;

&lt;p&gt;After all this, register the CSV service in the Program.cs, as shown in the next code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddScoped&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;ICSVService&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;CSVService&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, create a controller class named &lt;strong&gt;EmployeeController&lt;/strong&gt; inside the Controllers folder. Then, create the HttpPost request to read the CSV file using the &lt;strong&gt;ICSVService&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ApiController&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"[controller]"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;EmployeeController&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Controller&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="n"&gt;ICSVService&lt;/span&gt; &lt;span class="n"&gt;_csvService&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;EmployeeController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ICSVService&lt;/span&gt; &lt;span class="n"&gt;csvService&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="n"&gt;_csvService&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;csvService&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;HttpPost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"read-employees-csv"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IActionResult&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;GetEmployeeCSV&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;FromForm&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;IFormFileCollection&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_csvService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ReadCSV&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Employee&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;OpenReadStream&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;employees&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We injected the &lt;strong&gt;ICSVService&lt;/strong&gt; to use the read operation for CSV files. Also, &lt;strong&gt;EmployeeController&lt;/strong&gt; uses the &lt;strong&gt;ApiController&lt;/strong&gt; attribute to implement the Web API controller in ASP.NET Core. Then, we used the &lt;strong&gt;ReadCSV&lt;/strong&gt; method of the CSVService to get the data of the CSV file after reading it.&lt;/p&gt;

&lt;p&gt;First, let’s run the application. The following is the screenshot of the CSV file we use to read the data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CPZDVPEa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Reading-CSV-files-using-CSVHelper.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CPZDVPEa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Reading-CSV-files-using-CSVHelper.png" alt="Reading CSV files using CSVHelper" width="751" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, run the &lt;strong&gt;read-employees-csv&lt;/strong&gt; endpoint to read the CSV file like in the following figure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dNfkvu_V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Running-the-read-employees-csv-endpoint-to-read-the-CSV.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dNfkvu_V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Running-the-read-employees-csv-endpoint-to-read-the-CSV.png" alt="Run the read-employees-csv endpoint to read the CSV" width="880" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we have attached the CSV file we use to run the read.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MFtBmEpv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Attaching-the-CSV-file-we-used-to-run-the-read..png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MFtBmEpv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Attaching-the-CSV-file-we-used-to-run-the-read..png" alt="Attach the CSV file" width="880" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We received a response after running the API successfully.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing CSV files using CSVHelper
&lt;/h2&gt;

&lt;p&gt;We use &lt;strong&gt;CSVService&lt;/strong&gt; to create a CSV write method using the CSVHelper. For this, add an abstract method named &lt;strong&gt;WriteCSV&lt;/strong&gt; in the &lt;strong&gt;ICSVService&lt;/strong&gt; interface.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;ICSVService&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IEnumerable&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ReadCSV&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;Stream&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="n"&gt;WriteCSV&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;records&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, implement the WriteCSV method in the CSVService class like in the following code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CSVService&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ICSVService&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;IEnumerable&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ReadCSV&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;Stream&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;reader&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;StreamReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;CsvReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;CultureInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InvariantCulture&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;records&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;GetRecords&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;();&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;records&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="n"&gt;WriteCSV&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;records&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;writer&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;StreamWriter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"D:\\file.csv"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;CsvWriter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;CultureInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InvariantCulture&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteRecords&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;records&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;strong&gt;WriteCSV&lt;/strong&gt; method, the &lt;a href="https://docs.microsoft.com/en-us/dotnet/api/system.io.streamwriter?view=net-6.0"&gt;StreamWriter&lt;/a&gt; is used to create and write files in the path specified in the parameter. The &lt;strong&gt;CsvWriter&lt;/strong&gt; is used to create the actual CSV files using the &lt;strong&gt;StreamWriter&lt;/strong&gt; instance created. The &lt;strong&gt;WriteRecords&lt;/strong&gt; method writes all the data into the files.&lt;/p&gt;

&lt;p&gt;Now, use &lt;strong&gt;EmployeeController&lt;/strong&gt; to create a HttpPost request to create and write the CSV file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;ApiController&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"[controller]"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;EmployeeController&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Controller&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="n"&gt;ICSVService&lt;/span&gt; &lt;span class="n"&gt;_csvService&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;EmployeeController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ICSVService&lt;/span&gt; &lt;span class="n"&gt;csvService&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;_csvService&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;csvService&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;HttpPost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"write-employee-csv"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IActionResult&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;WriteEmployeeCSV&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;FromBody&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Employee&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;_csvService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;WriteCSV&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Employee&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;employees&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;HttpPost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"read-employees-csv"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;IActionResult&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;GetEmployeeCSV&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;FromForm&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;IFormFileCollection&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;employees&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_csvService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ReadCSV&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Employee&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;OpenReadStream&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;employees&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We implemented the new HttpPost request to write the CSV files using the &lt;strong&gt;WriteCSV&lt;/strong&gt; method of CSVService.&lt;/p&gt;

&lt;p&gt;Let’s run the Web API application. Then, we run the &lt;strong&gt;write-employee-csv&lt;/strong&gt; endpoint to test the service.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VyOihktD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Writing-CSV-files-using-CSVHelper.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VyOihktD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Writing-CSV-files-using-CSVHelper.png" alt="Run the write-employee-csv endpoint to test the service" width="880" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We used Swagger to run and test the API to write the CSV. We passed a list with two employee objects.&lt;/p&gt;

&lt;p&gt;And so, we have successfully created a CSV file in the directory path. The employee data is in the CSV file, like in the next figure.&lt;br&gt;&lt;br&gt;
 &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UeGQ2lQn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Output-of-the-created-CSV-file-in-the-directory-path-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UeGQ2lQn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.syncfusion.com/blogs/wp-content/uploads/2022/10/Output-of-the-created-CSV-file-in-the-directory-path-1.png" alt="Creating CSV file using CsvHelper package" width="831" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This article discussed handling CSV files using the CSVHelper package with an ASP. NET Core Web API application. This included performing read and write operations in the CSV file using the CSVHelper package.&lt;/p&gt;

&lt;p&gt;I hope this article will help you handle your next project’s CSV files. Thank you for reading.&lt;/p&gt;

&lt;p&gt;The Syncfusion &lt;a href="https://www.syncfusion.com/aspnet-core-ui-controls"&gt;ASP.NET Core UI control&lt;/a&gt; library, powered by &lt;a href="https://www.syncfusion.com/javascript-ui-controls"&gt;Essential JS 2&lt;/a&gt;, is the only suite you will ever need to build an app. It contains over 70 high-performance, lightweight, modular, and responsive UI controls in a single package. Use them to build stunning web apps!&lt;/p&gt;

&lt;p&gt;If you’re already a Syncfusion user, you can download the &lt;a href="https://www.syncfusion.com/account/downloads/studio/"&gt;product setup&lt;/a&gt;. If not, you can download a free &lt;a href="https://www.syncfusion.com/downloads"&gt;30-day trial &lt;/a&gt;to evaluate our products.&lt;/p&gt;

&lt;p&gt;You can contact us through our &lt;a href="https://www.syncfusion.com/forums"&gt;support forum&lt;/a&gt;, &lt;a href="https://support.syncfusion.com/"&gt;support portal&lt;/a&gt;, or &lt;a href="https://www.syncfusion.com/feedback/"&gt;feedback portal&lt;/a&gt;. As always, we are happy to assist you!&lt;/p&gt;

&lt;h2&gt;
  
  
  Related blogs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/syncfusion-essential-studio-2022-volume-3-is-here.aspx"&gt;Syncfusion Essential Studio 2022 Volume 3 Is Here!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/integrate-blazor-webassembly-in-asp-net-core-application.aspx"&gt;Simple Steps to Integrate a Blazor WebAssembly Project with an Existing ASP.NET Core Application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/creating-an-asp-net-core-crud-web-api-with-dapper-and-postgresql.aspx"&gt;Creating an ASP.NET Core CRUD Web API with Dapper and PostgreSQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.syncfusion.com/blogs/post/integrate-boldsign-into-your-asp-net-core-application.aspx"&gt;How to Integrate BoldSign into Your ASP.NET Core Application&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aspnetcore</category>
      <category>csharp</category>
      <category>dotnet</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
