Skip to content
  • Home
  • Search
  • Tools
  • About
  • Terms of Service Agreement
  • Log In
  • Guest

ANGULAR 10: Step One – Angular 10 + Bootstrap Setup

Posted on September 2, 2020July 6, 2023 By Andre Dias
angular, bootstrap, javascript

Back to index 

<Previous   Next >

Code download

Table of Contents

  • #ALTERNATIVE INSTALLATION METHODS
  • #INSTALLING THE PROJECT
  • #STARTING FROM SCRATCH
    • #PRE-REQUISITES
    • #CREATE THE ROOT DIRECTORY
    • #INSTALL angular/cli
    • #CHECK VERSION
    • #GENERATE THE PROJECT
    • #How does the default view work?
    • #INSTALLING ng-bootstrap
    • #INSTALLING Bootstrap

#ALTERNATIVE INSTALLATION METHODS

There are at least two alternatives to install a project:

  • the detailed, from scratch
  • the fast using “npm install”

The former is a good alternative to create your own project.
The latter installs the project from its own configuration defined by the package.json file, being the fastest method to start straight.

 

#INSTALLING THE PROJECT

Download the project at Github from “features/step01” branch.

Go to the project folder and run:

npm install

To start the app, run:

ng serve
or using another port:
ng serve –port 4300

Go to the browser and point to:

localhost:4200

 

#STARTING FROM SCRATCH

#PRE-REQUISITES

Assuming that node.js is already installed.

Otherwise go to:

node.js downloads

How To Install Node.Js And NPM On Windows

 

#CREATE THE ROOT DIRECTORY

1. Create a folder.

– Using console:
mkdir C:\it4us
mkdir C:\it4us\angular10bst

2. Go to the new folder created.

– Using console:
cd C:\it4us\angular10bst

 

#INSTALL angular/cli

This installation supplies the basic structure and commands.
Assuming that there are no previous installations on your system, you may install it globally, otherwise, to preserve your previous environment go to “ANGULAR: Step One B – Creating A Local Installation To Preserve Current Environment“.

 

– Run the command to install v.10.0.8, same as used to create this tutorial:
npm install -g @angular/cli@10.0.8

 

If desired the last one, but better using the same version used to this tutorial to avoid issues:
npm install -g @angular/cli@latest

 

#CHECK VERSION

Run the command:
ng –version

You get the an output similar to this one:

Angular CLI: 10.0.8
Node: 12.18.3
OS: win32 x64
Angular:
…
Ivy Workspace:
Package Version
——————————————————
@angular-devkit/architect 0.1000.8
@angular-devkit/core 10.0.8
@angular-devkit/schematics 10.0.8
@schematics/angular 10.0.8
@schematics/update 0.1000.8
rxjs 6.5.5

 

#GENERATE THE PROJECT

1. Run the command:

ng new angular10bst

Note: choose yes for the 1st question and enter for the 2nd.

 

2. Go the project’s folder created.
Note: all commands from now on will be issued under the project’s folder created by the previous command.

cd angular10bst
ng build
ng serve

To start the server using a different port to avoid conflicting with other projects, run:
ng serve –port 4300

 

3. To test, open the browser and point to:
http://localhost:4200/

 

The default Angular 10 initial page:

 

#How does the default view work?

The application uses the index.html file as starting point — the default configuration.
When pointed to localhost:4200 (or another port), the routing service will redirect to the default address.

This is configured in the app-routing.module.ts file at:

const routes: Routes = [];

The index.html file contains the initial page shown by the application by default since routing is empty, rendering the output that replaces <app-root></app-root> element.
The app-root element content comes from app.component.html.
By its turn the app.component.html contains <router-outlet></router-outlet> element
 that it is replaced by any content generated by the router service as explained in the Angular’s documentation:
“Acts as a placeholder that Angular dynamically fills based on the current router state.”
That way, the default page created by the “ng new myProject” command, when the project is created, resides into app.component.html.

 

#INSTALLING ng-bootstrap

ng add @ng-bootstrap/ng-bootstrap
@CHECK: it seems that ng cmd already add configuration to angular.json file.

#INSTALLING Bootstrap

Run:

npm install bootstrap

 

Back to index 

<Previous   Next >

Back to index 

<Previous   Next >

Andre Dias
Andre Dias

Brazilian system analyst graduated by UNESA (University Estácio de Sá – Rio de Janeiro). Geek by heart.

Post navigation

❮ Previous Post: ANGULAR: Create an Angular 10 project using Bootstrap – INDEX
Next Post: ANGULAR 10: Step One B – Creating A Local Installation To Preserve Current Environment ❯

Search

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Filter by Categories
angular
bootstrap
browser
computer science
container
data persistence
database
devops
editors
hardware
health
hosting
info
internet
it
java
javascript
network
node.js
play
protocol
security
self-help
selfhelp
server
services
soft
software engeneering
sql
support
Systems
techs
Uncategorized
versioning
web
web design
windows
wordpress

Recent Posts

  • Angular From Scratch Tutorial – Step 9: Modal
  • Angular From Scratch Tutorial – Step 8: Miscellany
  • Angular From Scratch Tutorial – Index
  • angular: Reading JSON files
  • NODE.JS: SEQUELIZE: MVC Project – 4TH STEP

Categories

  • angular (19)
  • bootstrap (6)
  • browser (4)
  • computer science (4)
  • container (1)
  • data persistence (2)
  • database (11)
  • devops (1)
  • editors (1)
  • hardware (4)
  • health (2)
  • hosting (1)
  • info (1)
  • internet (2)
  • it (1)
  • java (13)
  • javascript (32)
  • network (6)
  • node.js (1)
  • play (1)
  • protocol (1)
  • security (4)
  • self-help (1)
  • selfhelp (1)
  • server (2)
  • services (1)
  • soft (1)
  • software engeneering (1)
  • sql (1)
  • support (2)
  • Systems (1)
  • techs (3)
  • Uncategorized (2)
  • versioning (6)
  • web (1)
  • web design (5)
  • windows (3)
  • wordpress (4)

Copyright © 2025 .

Theme: Oceanly by ScriptsTown

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT