تنبيه

الرجاء تحديد نص من المقال أولاً.

Ahmed Bouchefra

Ahmed Bouchefra

أحمد بوشفرة

Software Engineer & Tech Author

ابدأ هنا
ابدأ هنا
المكتبة
المكتبة
خرائط الطريق
خرائط الطريق
الملخصات
الملخصات
الأدوات
الأدوات
اسأل
اسأل
اشترك
اشترك
عني
عني
المقالات
المقالات
كتبنا
كتبنا
الكاتب: أحمد بوشفرة

How to Install Angular 12 CLI and Create an Angular 12 Project with Routing

اضغط على زر PDF لتحميل المقال كملف للقراءة لاحقاً

ملاحظة: هذا المقال بقلم أحمد بوشفرة. الآراء الواردة تعبر عن الكاتب.

أحمد بوشفرة: مبرمج ومؤلف تقني، أساعد المطورين على بناء تطبيقات ويب حديثة وسريعة.

يمكنك التواصل مع الكاتب لطلب خدمات برمجية عبر:

In this tutorial, we’ll install the latest Angular CLI version and generate a new Angular 12 project with routing.

Let’s get started.

Step 1 — Setting up Angular CLI 12

In our first step, we’ll proceed to install the latest Angular CLI 12 version.

Note: You can also use Angular 11 with this tutorial.

Open a new command-line interface and run the following command:

$ npm install -g @angular/cli

This will install angular/cli v12.0.0.0 at the time of writing this tutorial.

In the next step, we’ll proceed to create a new example project from the command-line.

Step 2 — Creating a New Angular 12 Project

In our second step, we’ll use Angular CLI to create our example project. Go back to your terminal and run the following commands:

$ cd ~
$ ng new angular-example-with-routing

You’ll get prompted for a couple of things — If Would you like to add Angular routing? Say y and Which stylesheet format would you like to use? Pick CSS.

This will set up routing in our project and set CSS as the stylesheets format for components.

Next, go to the root folder of your project and run the local development server using the following commands:

$ cd angular-example-with-routing
$ ng serve    

A live-reload server will be running from the http://localhost:4200/ address:

لا تفوت أي محتوى جديد! 🔔

اشترك في الإشعارات لتصلك المقالات الجديدة والموارد المجانية مباشرة

احصل على موارد مجانية! 📚

اشترك في القائمة البريدية واحصل على كتب ومصادر تعليمية مجانية

📚 المكتبة المجانية

حمّل كتب وأدلة PDF مجانية في البرمجة وتطوير الويب

تصفح المكتبة

شارك المقال