У нас вы можете посмотреть бесплатно How to Create an Angular Application with the Latest Version 12 of Angular CLI или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Learn how to properly set up your Angular application using the latest version of Angular CLI. This guide will help you avoid common pitfalls and ensure a smooth setup process. --- This video is based on the question https://stackoverflow.com/q/69503966/ asked by the user 'sensorario' ( https://stackoverflow.com/u/1420625/ ) and on the answer https://stackoverflow.com/a/69504068/ provided by the user 'yurzui' ( https://stackoverflow.com/u/5485167/ ) at 'Stack Overflow' website. Thanks to these great users and Stackexchange community for their contributions. Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: Why ng new app installed older version than 12 (that is now the latest) Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l... The original Question post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license. If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com. --- How to Create an Angular Application with the Latest Version 12 of Angular CLI When starting a new Angular project, you might find yourself puzzled if the Angular CLI installs an older version than expected. For instance, many users have been surprised to see their newly created application defaulting to Angular 8 instead of the latest Angular 12. If you are facing a similar problem, don’t worry! In this guide, we will explore how to effectively create an Angular application using the latest version of Angular CLI. Understanding the Problem While trying to create an Angular application, you may encounter the following issues: Running the command ng new app unexpectedly creates a project using Angular version 8. The output of the ng version command shows an older version of Angular instead of the expected 12.* version. Example Scenario Here’s a snapshot of what you might see when running ng version: [[See Video to Reveal this Text or Code Snippet]] It's clear that your Angular CLI is out of date and isn’t creating projects with the newest versions. Solution: Creating an Angular 12 Application To create a new Angular application using the latest version, you can follow these simple steps: Method 1: Using NPX Instead of using the standard ng new <my-project> command, utilize npx to specifically target the version you want: [[See Video to Reveal this Text or Code Snippet]] This command will: Install the Angular CLI version 12 temporarily. Create a new Angular application named <my-project> using this version. Method 2: Creating an App with the Latest Version If you want to create an application with the very latest version available (which may be later than 12), you can run: [[See Video to Reveal this Text or Code Snippet]] This will pull the latest stable version without specifying it, ensuring you're always up-to-date. Method 3: Specifying a Specific Version If you want to target a specific version (for instance, if version 12.2.2 is your target), you can do the following: [[See Video to Reveal this Text or Code Snippet]] This will create your Angular application using the specific version 12.2.2. Why Use NPX? Using npx is advantageous because: No Global Installation: You don’t need to install the Angular CLI globally, which can often lead to version conflicts. Flexibility: You can easily switch between different versions of Angular CLI as needed. Conclusion: Keep Your Angular Apps Updated The ability to create Angular applications with the latest versions ensures that you have access to new features, improvements, and bug fixes. By using npx, you can avoid confusion and dependency issues that arise from older versions of the Angular CLI. Now that you have this knowledge, go ahead and create your Angular application with the latest features at your fingertips!