Cookie Consent by Free Privacy Policy Generator 📌 Updates from the Angular Team and new Angular 17 features!

🏠 Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeiträge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden Überblick über die wichtigsten Aspekte der IT-Sicherheit in einer sich ständig verändernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch übersetzen, erst Englisch auswählen dann wieder Deutsch!

Google Android Playstore Download Button für Team IT Security



📚 Updates from the Angular Team and new Angular 17 features!


💡 Newskategorie: Programmierung
🔗 Quelle: dev.to

Table of content

  • 1 - New site domain and home for developers
  • 2 - New tutorials and playground
  • 3 - New Angular logo
  • 4 - SSR and SSG are now stable
  • 5 - New control flow
    • @if
    • @for
    • @switch
  • 6 - Defer syntax is in developer preview
  • 7 - Standalone components by default
  • 8 - Webpack deprecated in favor of Esbuild and Vite
  • 9 - New inspect mode for dependency injection graph
  • 10 - Custom @Input transforms
  • 11 - Minor refactor in styles and styleUrl properties

So, on November 6, 2023, the Angular Team dropped some cool updates and talked about a bunch of new Angular 17 features that I'd love to break down for you.

You have the whole live event on YouTube.

1 - New site domain and home for developers

The new website with all the documentation updated, reference materials, and core concepts, is ready for new developers at angular.dev.

It's going to be open-sourced soon and might serve as a good production example app. I have mine here, which I'm planning to update soon ;)

Screenshot of the new website

2 - New tutorials and playground

They released new tutorials addressed to beginners, intermediate, and advanced developers. They are going to be embedded in the website itself.

There is going to be a new essentials guide, to manage all the core concepts.

The playground has been redesigned and is at angular.dev/playground.

3 - New Angular logo

Because new modern things are coming and the brand seems a little bit old. It tries to be more inclusive.

New Angular logo

4 - SSR and SSG are now stable

There is a new option for creating an app with the server side enabled from the start. A lot of people have been asking for improvements in this topic. Here they are:

  1. ESM support for server builds
  2. Build speed improvements for server bundles
  3. Dev server SSR improvements
  4. Hydration is now stable for production. More in angular.dev/guide/hydration.

The future is about SSR streaming. They are going in that direction.

5 - New control flow

Another key feature is the new control flow, which is easier to read and write, has new features like if-else, and has also performance improvements. Let's see some examples:

@if

<section>
    @if (user.loggedIn) {
        <app-dashboard />
    }
    @else {
        <app-login />
    }
</section>

@for

<section>
    @for (user of userList; track user) {
        <app-card [data]="user" />
    }
    @empty {
        <p>There were no items in the list</p>
    }
</section>

A few notes here. Track property is mandatory to avoid memory problems. We can use @empty, when the array has no elements, to directly show something.

@switch

<section>
    @switch (membershipStatus) {
        @case ("gold") {
            <p>Your discount is 20%</p>
        }
        @default {
            <p>Keep earning rewards.</p>
        }
    }
</section>

This new control flow makes the template render sometimes 90% faster than before. It is optional and a migration is available for it.

6 - Defer syntax is in developer preview

Now we are going to be able to defer some parts of the template. It is non-blocking. Here you have a complete example:

<button #trigger (click)="load = true">
    Load component
</button>

@defer (on viewport(trigger); when load == true) {
    <recommended-movies />
} @placeholder (minimum 500ms) {
    <img src="placeholder-image.png" />
} @loading (after 500ms; minimum 1s) {
    <spinner />
} @error {
    <p> Oops, something went wrong</p>
}

There are some built-in triggers, such as:

  • idle: load as soon as your browser reports it is in an idle state.
  • interaction: load when an element is clicked, focused, or similar behavior.
  • viewport: load when the content enters the client's viewport window.
  • hover: load when the mouse is hovering over an area.
  • timer: load after a specific timeout.

You can also do prefetching and also create custom triggers:

<section #trigger>
    ...
    @defer (prefetch on immediate;
            prefetch when val === true) {
        <large-component />
    }
    ...
</section>

The documentation has been improved and it's available at angular.dev/guide/defer.

7 - Standalone components by default

The team has decided to set standalone components enabled by default. NgModules are still valid.

8 - Webpack deprecated in favor of Esbuild and Vite

As Standalone Components, Esbuild is enabled by default for new projects. As an example, the angular material documentation website now builds 2.5 times faster using this configuration.

They recommend migrating all projects to Esbuild because of the performance improvements and future better support.

Vite logo

9 - New inspect mode for dependency injection graph

It is available in the angular dev tools.

Devtools capture

10 - Custom @Input transforms

If the value has to be transformed and normalized to a certain type, there are some built-in transformers:

@Component({
  selector: 'custom-slider',
  ...
})
export class CustomSlider {
  @Input({transform: trimString}) label = '';
}
function trimString(value: string | undefined) {
  return value?.trim() ?? '';
}

11 - Minor refactor in styles and styleUrl properties

Last but not least, they updated these properties while creating a component. Before, they were arrays. Now you can write:

@Component({
  styleUrl: './user-profile.component.css',
  styles: '.username {color: red; }',
  ...
})

I hope you have learned something new from all. If you think this might help other people, please hit the like button so that others can read it. ❤️

If you have any thoughts or questions, feel free to leave a comment!

...



📌 Updates from the Angular Team and new Angular 17 features!


📈 45.02 Punkte

📌 CVE-2023-26116 | angular angular.copy redos (SNYK-JS-ANGULAR-3373044)


📈 32.96 Punkte

📌 How to upgrade your Angular web project from Angular V13 to Angular V17


📈 32.96 Punkte

📌 Angular 14: New Eye-Popping Features and Updates


📈 26.76 Punkte

📌 Google's New Angular 2.0 Isn't Compatible With Angular 1


📈 24.9 Punkte

📌 Google's New Angular 2.0 Isn't Compatible With Angular 1


📈 24.9 Punkte

📌 Angular Addicts #24: Angular 17.3, Signals and unit testing best practices, Storybook 8 & more


📈 23.76 Punkte

📌 How to Run Angular Apps Using Angular CLI and PM2


📈 23.76 Punkte

📌 Angular 5.1 zusammen mit Angular Material 5.0.0 erschienen


📈 21.98 Punkte

📌 ANGULAR 6 (FORMERLY ANGULAR 2) – THE COMPLETE GUIDE


📈 21.98 Punkte

📌 7 steps to Angular Material Dialog instead of Angular Component


📈 21.98 Punkte

📌 Building a Dynamic Serverless Photo Blog with Angular & Google Sheets - 1: Solving Angular Router Navigation Issues


📈 21.98 Punkte

📌 CVE-2023-26117 | angular redos (SNYK-JS-ANGULAR-3373045)


📈 21.98 Punkte

📌 ANGULAR (FULL APP) WITH ANGULAR MATERIAL, ANGULARFIRE & NGRX


📈 21.98 Punkte

📌 Angular 17 Encrypting Decrypting Data with CryptoJs | Angular 17 Tutorial | React


📈 21.98 Punkte

📌 Episode 24/13: Native Signals, Details on Angular/Wiz, Alan Agius on the Angular CLI


📈 21.98 Punkte

📌 Angular Universal is the Problem, not Angular


📈 21.98 Punkte

📌 CVE-2023-26118 | angular redos (SNYK-JS-ANGULAR-3373046)


📈 21.98 Punkte

📌 Unveiling Angular 17 - The Angular Renaissance


📈 21.98 Punkte

📌 Angular is Much Better, But is Angular Universal?


📈 21.98 Punkte

📌 Accelerate Angular App Development with create-angular-auth-nav


📈 21.98 Punkte

📌 Implementing Angular Server-Side Rendering (SSR) AKA Angular Universal


📈 21.98 Punkte

📌 Red Team v. Blue Team? They Are In Fact One – The Purple Team


📈 21.83 Punkte

📌 What's New in Angular 16? Top features to discover.


📈 20 Punkte

📌 What's new features in Angular 17?


📈 20 Punkte

📌 New PenTesting / Red Team Subreddit (And Blue Team Version!)


📈 19.26 Punkte

📌 Next.js vs. Angular: Comparing key features and use cases


📈 18.86 Punkte

📌 5 Must-Have Angular Grid Row Features and How To Use Them


📈 18.86 Punkte

📌 Windows Bridge for iOS: Project updates, new features, and new samples


📈 18.7 Punkte

📌 Windows Bridge for iOS: Project updates, new features, and new samples


📈 18.7 Punkte











matomo