<?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: Mofiro Jean </title>
    <description>The latest articles on DEV Community by Mofiro Jean  (@mofirojean).</description>
    <link>https://dev.to/mofirojean</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F966237%2Faf2bd298-50dc-4391-9193-34d4a5208d6e.jpg</url>
      <title>DEV Community: Mofiro Jean </title>
      <link>https://dev.to/mofirojean</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mofirojean"/>
    <language>en</language>
    <item>
      <title>Getting started with Angular</title>
      <dc:creator>Mofiro Jean </dc:creator>
      <pubDate>Mon, 24 Mar 2025 13:32:00 +0000</pubDate>
      <link>https://dev.to/ngcameroon/getting-started-with-angular-fb5</link>
      <guid>https://dev.to/ngcameroon/getting-started-with-angular-fb5</guid>
      <description>&lt;p&gt;&lt;a href="https://angular.dev" rel="noopener noreferrer"&gt;Angular&lt;/a&gt; is one of the coolest frameworks around for building dynamic web apps. Whether you’re totally new to web development or switching over from another framework, this guide will get you started with Angular quickly and have a bit of fun along the way!&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s in Store:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is Angular?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Setting Up Your Angular Playground&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Creating Your First Angular Project&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Getting to Know Your Angular App&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Running Your App Locally&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  1. What’s Angular All About?
&lt;/h3&gt;

&lt;p&gt;Angular is a framework by Google for building single-page applications (SPAs) using HTML, CSS, and TypeScript. It’s a modern take on web development that makes building complex apps a breeze. Here are some fun features you’ll love:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Two-way Data Binding:&lt;/strong&gt; Keeps your data and UI in perfect sync—magic!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dependency Injection:&lt;/strong&gt; Helps you organize and test your code with ease.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Angular CLI:&lt;/strong&gt; A powerful command-line tool that makes setting up and managing your project super simple.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. Setting Up Your Angular Playground
&lt;/h3&gt;

&lt;p&gt;Before you dive into coding, you need to set up your environment. Here’s how to get started:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Install Node.js and npm&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Angular runs on Node.js. Download it from &lt;a href="https://nodejs.org/" rel="noopener noreferrer"&gt;nodejs.org&lt;/a&gt;. Installing Node.js also gets you npm, which is like your app’s personal assistant for managing dependencies.&lt;/p&gt;

&lt;p&gt;Open your terminal and check your installation with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm &lt;span class="nt"&gt;-v&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.amazonaws.com%2Fuploads%2Farticles%2F6gzqw2ao0v5zxww6o3rp.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.amazonaws.com%2Fuploads%2Farticles%2F6gzqw2ao0v5zxww6o3rp.png" alt="Version for Node and npm" width="544" height="71"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Install Angular CLI&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Angular CLI is your best buddy for Angular development. Install it globally with:&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;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @angular/cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, make sure it’s working by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng version
&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.amazonaws.com%2Fuploads%2Farticles%2F1z2lg7diiujqxwltg1d4.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.amazonaws.com%2Fuploads%2Farticles%2F1z2lg7diiujqxwltg1d4.png" alt="Angular version on ubuntu terminal" width="757" height="445"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Creating Your First Angular Project
&lt;/h3&gt;

&lt;p&gt;Now for the fun part—building your very first Angular app!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Generate a New Project&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Use Angular CLI to kick off a new project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng new my-first-angular-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll get a couple of quick prompts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Which stylesheet format?&lt;/strong&gt; Choose “CSS” to keep things simple.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)?&lt;/strong&gt; Choose “No”.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fdsm668h1bt9hsrm537fx.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.amazonaws.com%2Fuploads%2Farticles%2Fdsm668h1bt9hsrm537fx.png" alt="Generated files following the creation of an Angular project using the  raw `ng new command` endraw " width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Step Into Your Project&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Change into your project’s folder:&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;cd &lt;/span&gt;my-first-angular-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Launch Your App&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Fire up the development server with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng serve
&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.amazonaws.com%2Fuploads%2Farticles%2Fmojbtmtiwa0qck1fcstv.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.amazonaws.com%2Fuploads%2Farticles%2Fmojbtmtiwa0qck1fcstv.png" alt="Successful bundling of our angular application" width="800" height="186"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open your browser and visit &lt;a href="http://localhost:4200" rel="noopener noreferrer"&gt;http://localhost:4200&lt;/a&gt; to see your shiny new app in action!&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Getting to Know Your Angular App
&lt;/h3&gt;

&lt;p&gt;After creating your Angular project, you'll encounter a structured set of files and folders. Let's explore the key components within the &lt;code&gt;src/app/&lt;/code&gt; directory:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;app.config.ts&lt;/code&gt;&lt;/strong&gt;: Defines the application configuration, instructing Angular on assembling the application. As you introduce more providers, declare them here.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;app.component.ts&lt;/code&gt;&lt;/strong&gt;: Defines the root component, &lt;code&gt;AppComponent&lt;/code&gt;, which serves as the primary view in your application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;app.component.html&lt;/code&gt;&lt;/strong&gt;: The HTML template associated with &lt;code&gt;AppComponent&lt;/code&gt;, where you design the user interface.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;app.component.css&lt;/code&gt;&lt;/strong&gt;: Contains the CSS styles specific to &lt;code&gt;AppComponent&lt;/code&gt;, allowing for component-level styling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;app.component.spec.ts&lt;/code&gt;&lt;/strong&gt;: Provides unit tests for &lt;code&gt;AppComponent&lt;/code&gt; to ensure its functionality remains intact during development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;app.routes.ts&lt;/code&gt;&lt;/strong&gt;: Defines the application's routing configuration, mapping URL paths to components.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding these files is crucial, as they form the backbone of your Angular application, enabling you to build, configure, and style your app effectively. For more information on the functions of the various files and directories, checkout &lt;a href="https://angular.dev/reference/configs/file-structure#workspace-configuration-files" rel="noopener noreferrer"&gt;workspace configuration files&lt;/a&gt; in an Angular app.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Running and Enjoying Your Angular App
&lt;/h3&gt;

&lt;p&gt;Anytime you want to work on your app, just run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you’re feeling adventurous and want to change the port, try:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ng serve &lt;span class="nt"&gt;--port&lt;/span&gt; 4300
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The server reloads your app automatically whenever you make changes—so you can see your progress instantly!&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.amazonaws.com%2Fuploads%2Farticles%2Fedjlomy97nod0wlemnfd.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.amazonaws.com%2Fuploads%2Farticles%2Fedjlomy97nod0wlemnfd.png" alt="Our served angular app application on the browser" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What’s Next?
&lt;/h2&gt;

&lt;p&gt;Now that you’ve set up and run your first Angular project, you’re ready to dive deeper.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Create More Components:&lt;/strong&gt; Build custom parts of your UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Master Data Binding:&lt;/strong&gt; Learn how to make your data and view work together seamlessly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explore Services and APIs:&lt;/strong&gt; Discover how to fetch and manage data from external sources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Angular is a powerful tool, and with its amazing CLI and organised structure, you’re well on your way to building stunning web applications—whether it’s a simple site or a complex enterprise app. Stay tuned for more fun tutorials as you continue your Angular adventure!&lt;/p&gt;




&lt;p&gt;Happy coding, and have fun exploring Angular 🚀.&lt;/p&gt;

</description>
      <category>angular</category>
      <category>webcomponents</category>
      <category>typescript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
