angular project example

Example 1: setup new angular project

/*
Setting up new angular project and run on browser
*/
npm install -g @angular/cli
ng new project-name
cd project-name
ng serve

/*
I hope it will help you.
Namaste
*/

Example 2: angular new project

ng new project_name

Example 3: Angular 9 tutorial

<div class="calculator">

  <input type="text" class="calculator-screen" value="0" disabled />

  <div class="calculator-keys">

    <button type="button" class="operator" value="+">+</button>
    <button type="button" class="operator" value="-">-</button>
    <button type="button" class="operator" value="*">×</button>
    <button type="button" class="operator" value="/">÷</button>

    <button type="button" value="7">7</button>
    <button type="button" value="8">8</button>
    <button type="button" value="9">9</button>


    <button type="button" value="4">4</button>
    <button type="button" value="5">5</button>
    <button type="button" value="6">6</button>


    <button type="button" value="1">1</button>
    <button type="button" value="2">2</button>
    <button type="button" value="3">3</button>


    <button type="button" value="0">0</button>
    <button type="button" class="decimal" value=".">.</button>
    <button type="button" class="all-clear" value="all-clear">AC</button>

    <button type="button" class="equal-sign" value="=">=</button>

  </div>
</div>

Example 4: angular coding examples

<!-- example.component.html -->

<div>Current Time: {{timestamp | date:‘short’}}</div>

Example 5: angular coding examples

cd my-app
ng serve --open