content icon indicating copy to clipboard operation
content copied to clipboard

35381 angular update

Open ragul1697 opened this issue 1 year ago • 3 comments

Fixes #35381 - Updating the tutorial for Angular to latest version

ragul1697 avatar Aug 29 '24 14:08 ragul1697

Preview URLs (6 pages)
Flaws (1255)

Note! 1 document with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Learn_web_development/Core/Frameworks_libraries/Angular_building Title: Building Angular applications and further resources Flaw count: 251

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/Installing_basic_software
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/What_will_your_website_look_like
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/Dealing_with_files
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/HTML_basics
    • and 246 more flaws omitted

URL: /en-US/docs/Learn_web_development/Core/Frameworks_libraries/Angular_getting_started Title: Getting started with Angular Flaw count: 251

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/Installing_basic_software
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/What_will_your_website_look_like
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/Dealing_with_files
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/HTML_basics
    • and 246 more flaws omitted

URL: /en-US/docs/Learn_web_development/Core/Frameworks_libraries/Angular_item_component Title: Creating an item component Flaw count: 251

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/Installing_basic_software
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/What_will_your_website_look_like
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/Dealing_with_files
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/HTML_basics
    • and 246 more flaws omitted

URL: /en-US/docs/Learn_web_development/Core/Frameworks_libraries/Angular_todo_list_beginning Title: Beginning our Angular todo list app Flaw count: 251

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/Installing_basic_software
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/What_will_your_website_look_like
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/Dealing_with_files
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/HTML_basics
    • and 246 more flaws omitted

URL: /en-US/docs/Learn_web_development/Core/Frameworks_libraries/Main_features Title: Framework main features Flaw count: 251

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/Installing_basic_software
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/What_will_your_website_look_like
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/Dealing_with_files
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/HTML_basics
    • and 246 more flaws omitted
External URLs (32)

URL: /en-US/docs/Glossary/Router Title: Router


URL: /en-US/docs/Learn_web_development/Core/Frameworks_libraries/Angular_building Title: Building Angular applications and further resources


URL: /en-US/docs/Learn_web_development/Core/Frameworks_libraries/Angular_getting_started Title: Getting started with Angular


URL: /en-US/docs/Learn_web_development/Core/Frameworks_libraries/Angular_item_component Title: Creating an item component


URL: /en-US/docs/Learn_web_development/Core/Frameworks_libraries/Angular_todo_list_beginning Title: Beginning our Angular todo list app


URL: /en-US/docs/Learn_web_development/Core/Frameworks_libraries/Main_features Title: Framework main features

(comment last updated: 2024-12-20 11:14:07)

github-actions[bot] avatar Aug 29 '24 14:08 github-actions[bot]

Thanks for making the changes! I will take a look in the coming days.

bsmth avatar Aug 30 '24 13:08 bsmth

I haven't forgotten about this one, BTW, I have some other work that's top of my list for the moment. I will be getting back to this shortly. Thanks for the patience.

bsmth avatar Sep 20 '24 08:09 bsmth

Changelog, for convenience: https://github.com/angular/angular/releases/tag/18.0.0

bsmth avatar Oct 28 '24 09:10 bsmth

Thanks for the improvements, the only issue I see is that this PR is targeting the @next version which may change, so this concerns the 'structural directives' syntax: https://angular.dev/guide/directives#built-in-structural-directives

  • https://next.angular.dev/api/core/@for# v https://angular.dev/api/common/NgFor
  • https://next.angular.dev/api/core/@if# v https://angular.dev/api/common/NgIf

bsmth avatar Oct 28 '24 09:10 bsmth

Some comments:

In Angular_todo_list_beginning, I would change the ### Dynamically change the UI with @if and @for section to:

### Control flow with @if and @for blocks

This tutorial covers two important Angular [control flow blocks](https://angular.dev/essentials/conditionals-and-loops) which tell the framework when and how your templates should be rendered.
The first block that this tutorial covers is the [`@for` block](https://angular.dev/api/core/@for) which loops through a collection and repeatedly renders the content of a block.

The second block that you learn in this tutorial is [`@if`](https://angular.dev/api/core/@if).
You can use `@if` to display content based on a condition.
For example, if a user clicks an "edit" button, you can show elements used to edit an item.
If a user clicks "cancel", you can remove the elements used for editing.

In "Add HTML to the AppComponent template":

The `<li>` is inside a `@for` block that iterates over the items in the `items` array.
For each item, a new `<li>` is created.
The double curly braces that contain `item.description` instructs Angular to populate each `<li>` with the text of each item's description.

The `track` keyword in Angular's `@for` block helps Angular identify which items in an array have changed, been added, or removed.
This makes it easier and faster for Angular to update the DOM when the array is modified.

And in "Creating an item component", we should change the following:

-On this `<div>` is an `@if`, a built-in Angular directive that you can use to dynamically change the structure of the DOM.
-This `@if` means that if `editable` is `false`, this `<div>` is in the DOM. If `editable` is `true`, Angular removes this `<div>` from the DOM.
+On this `<div>` is an `@if` block that you can use to render parts of a template based on a condition.
+This `@if` means that if `editable` is `false`, this `<div>` is rendered in the template. If `editable` is `true`, Angular removes this `<div>` from the DOM.


-You can update the `@Component` to use [`CommonModule`](https://angular.dev/api/common/CommonModule) in `app/item/item.component.ts` so that we can use the `@if` directives:
+You can update the `@Component` to use [`CommonModule`](https://angular.dev/api/common/CommonModule) in `app/item/item.component.ts` so that we can use the `@if` blocks:


-The `@for` - Angular's repeater directive, used to iterate over all of the items in the `items` array.
-Angular's `@for` like `@if`, is another directive that helps you change the structure of the DOM while writing less code.
+The `@for` - Angular's control flow block, used to iterate over all of the items in the `items` array.
+Angular's `@for` like `@if`, is another block that helps you change the structure of the DOM while writing less code.


-You can wrap other elements such as `<div>`, `<span`, or `<p>` within an `@for` directive.
+You can wrap other elements such as `<div>`, `<span`, or `<p>` within an `@for` block.

bsmth avatar Nov 19 '24 09:11 bsmth

@ragul1697 let me know if you need a hand, I'm happy to apply the changes on your branch if you're okay with that. TY

bsmth avatar Nov 25 '24 11:11 bsmth

Hi @bsmth, I have made the changes for control blocks instead of directives. This will wrap up the content for Angular 18. But now, Angular 19 is released. Do we have to make changes for that also? There is also a discussion with a suggestion that removing the guides for each and every framework. Link for the Discussion

ragul1697 avatar Nov 25 '24 14:11 ragul1697

Hi @bsmth, I have made the changes for control blocks instead of directives. This will wrap up the content for Angular 18. But now, Angular 19 is released. Do we have to make changes for that also? There is also a discussion with a suggestion that removing the guides for each and every framework. Link for the Discussion

Thanks a lot, the changes look good. As Chris mentioned in the Discussion, we're going to move content first and then take stock of guides for maintenance plans.

But now, Angular 19 is released. Do we have to make changes for that also?

Let's keep this isolated to v18 first. There are large changes landing in the Learn area in the next few days, so we can wait until that's settled and then revise. I'm going to postpone merging until that's clearer, thanks a lot for your patience.

bsmth avatar Nov 26 '24 09:11 bsmth

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Dec 19 '24 15:12 github-actions[bot]

The Learn PR has finished now (hence the conflicts) I will give you a hand fixing this

bsmth avatar Dec 19 '24 17:12 bsmth

Let's merge this! Thanks a lot for your patience 🙏🏻

bsmth avatar Dec 20 '24 11:12 bsmth