Categories

Friday, April 19, 2024
#919814419350 therichposts@gmail.com
Angular 11Bootstrap 4

Angular 11 Bootstrap 4 Modern Price Section

Angular 11 Bootstrap 4 Modern Price Section

Hello friends, welcome back to my blog. Today in this blog post, I am going to tell you, Angular 11 Bootstrap 4 Modern Price Section.

Angular Pricing Page

Angular 11 came and if you are new then you must check below two links:

  1. Angular11 Basic Tutorials

Friends now I proceed onwards and here is the working code snippet for Angular 11 Bootstrap 4 Modern Price Section and please use carefully this to avoid the mistakes:

Angular 11 Bootstrap 4 Modern Price Section
Angular 11 Bootstrap 4 Modern Price Section

1. Firstly friends we need fresh angular 11 setup and for this we need to run below commands but if you already have angular 11 setup then you can avoid below commands. Secondly we should also have latest node version installed on our system:

npm install -g @angular/cli 

ng new angulardashboard //Create new Angular Project

cd angulardashboard // Go inside the Angular Project Folder

ng serve --open // Run and Open the Angular Project

http://localhost:4200/ // Working Angular Project Url

 

2. Now friends, here we need to run below commands into our project terminal to install bootstrap and jquery modules into our angular application:

npm install --save bootstrap

npm i jquery --save 

 

3. Now friends, here we need to add below  into our angular.json file:

...
 "styles": [
              "src/styles.css",
              "node_modules/bootstrap/dist/css/bootstrap.min.css"
             
              
            ],
            "scripts": [
              "node_modules/jquery/dist/jquery.min.js", 
              
              "node_modules/bootstrap/dist/js/bootstrap.min.js"
              
              
              
            ]
...

 

4. Now friends we just need to add below code into src/app/app.component.html file to get final out on the web browser:

<div class="container">
    <div class="text-center">
        <div class="nav price-tabs" role="tablist">
            <a class="nav-link active" href="#yearly" role="tab" data-toggle="tab">Yearly</a>
            <a class="nav-link" href="#monthly" role="tab" data-toggle="tab">Monthly</a>
        </div>
    </div>
    <div class="tab-content wow fadeIn" style="visibility: visible; animation-name: fadeIn;">
        <div role="tabpanel" class="tab-pane fade show active" id="yearly">
            <div class="row justify-content-center">
                <div class="col-md-6 col-lg-4 mb-30">
                    <div class="price-item text-center">
                        <div class="price-top">
                            <h4>Personal</h4>
                            <h2 class="mb-0"><sup>$</sup>99</h2>
                            <span class="text-capitalize">per year</span>
                        </div>
                        <div class="price-content">
                            <ul class="border-bottom mb-30 mt-md-4 pb-3 text-left">
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Eget erovtiu faucid</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Cras justo odio</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Morbi leo risus</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span>Porta consectetur ac</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span> Vestibulum at eros</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span>Adipisci atque beatae</span>
                                </li>
                            </ul>
                            <a href="#" class="btn btn-custom">Buy now</a>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-lg-4 mb-30">
                    <div class="price-item text-center popular">
                        <div class="price-top">
                            <h4>Business</h4>
                            <h2 class="mb-0"><sup>$</sup>299</h2>
                            <span class="text-capitalize">per year</span>
                        </div>
                        <div class="price-content">
                            <ul class="border-bottom mb-30 mt-md-4 pb-3 text-left">
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Eget erovtiu faucid</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Cras justo odio</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Morbi leo risus</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span>Porta consectetur ac</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span> Vestibulum at eros</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span>Adipisci atque beatae</span>
                                </li>
                            </ul>
                            <a href="#" class="btn btn-custom btn-light">Buy now</a>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-lg-4 mb-30">
                    <div class="price-item text-center">
                        <div class="price-top">
                            <h4>Enterprise</h4>
                            <h2 class="mb-0"><sup>$</sup>399</h2>
                            <span class="text-capitalize">per year</span>
                        </div>
                        <div class="price-content">
                            <ul class="border-bottom mb-30 mt-md-4 pb-3 text-left">
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Eget erovtiu faucid</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Cras justo odio</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Morbi leo risus</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span>Porta consectetur ac</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span> Vestibulum at eros</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span>Adipisci atque beatae</span>
                                </li>
                            </ul>
                            <a href="#" class="btn btn-custom">Buy now</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div role="tabpanel" class="tab-pane fade" id="monthly">
            <div class="row justify-content-center">
                <div class="col-md-6 col-lg-4 mb-30">
                    <div class="price-item text-center">
                        <div class="price-top">
                            <h4>Personal</h4>
                            <h2 class="mb-0"><sup>$</sup>29</h2>
                            <span class="text-capitalize">per month</span>
                        </div>
                        <div class="price-content">
                            <ul class="border-bottom mb-30 mt-md-4 pb-3 text-left">
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Eget erovtiu faucid</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Cras justo odio</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Morbi leo risus</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span>Porta consectetur ac</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span> Vestibulum at eros</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span>Adipisci atque beatae</span>
                                </li>
                            </ul>
                            <a href="#" class="btn btn-custom">Buy now</a>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-lg-4 mb-30">
                    <div class="price-item text-center popular">
                        <div class="price-top">
                            <h4>Business</h4>
                            <h2 class="mb-0"><sup>$</sup>59</h2>
                            <span class="text-capitalize">per month</span>
                        </div>
                        <div class="price-content">
                            <ul class="border-bottom mb-30 mt-md-4 pb-3 text-left">
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Eget erovtiu faucid</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Cras justo odio</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Morbi leo risus</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span>Porta consectetur ac</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span> Vestibulum at eros</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span>Adipisci atque beatae</span>
                                </li>
                            </ul>
                            <a href="#" class="btn btn-custom btn-light">Buy now</a>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 col-lg-4 mb-30">
                    <div class="price-item text-center">
                        <div class="price-top">
                            <h4>Enterprise</h4>
                            <h2 class="mb-0"><sup>$</sup>99</h2>
                            <span class="text-capitalize">per month</span>
                        </div>
                        <div class="price-content">
                            <ul class="border-bottom mb-30 mt-md-4 pb-3 text-left">
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Eget erovtiu faucid</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Cras justo odio</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-check mr-2"></i>
                                    <span class="c-black">Morbi leo risus</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span>Porta consectetur ac</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span> Vestibulum at eros</span>
                                </li>
                                <li>
                                    <i class="zmdi zmdi-close mr-2"></i>
                                    <span>Adipisci atque beatae</span>
                                </li>
                            </ul>
                            <a href="#" class="btn btn-custom">Buy now</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

 

5. Now friends we just need to add below code into src/app/app.component.css file:

body{
    background:#eee!important;
    margin-top:20px;}

/* ===== PRICING PAGE ===== */
.price-tabs {
  background-color: #fff;
  -webkit-box-shadow: 0 5px 20px 0 rgba(39, 39, 39, 0.1);
          box-shadow: 0 5px 20px 0 rgba(39, 39, 39, 0.1);
  display: inline-block;
  padding: 7px;
  border-radius: 40px;
  border: 1px solid #00b5ec;
  margin-bottom: 45px;
}

@media (min-width: 768px) {
  .price-tabs {
    margin-bottom: 60px;
  }
}

.price-tabs .nav-link {
  color: #00b5ec;
  font-weight: 500;
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  padding: 12px 35px;
  display: inline-block;
  text-transform: capitalize;
  border-radius: 40px;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .price-tabs .nav-link {
    padding: 12px 40px;
  }
}

.price-tabs .nav-link.active {
  background-color: #00b5ec;
  color: #fff;
}

.price-item {
  background-color: #fff;
  -webkit-box-shadow: 0 5px 30px 0 rgba(39, 39, 39, 0.15);
          box-shadow: 0 5px 30px 0 rgba(39, 39, 39, 0.15);
  border-radius: 10px;
}

@media (min-width: 768px) {
  .price-item {
    margin: 0 20px;
    padding-top: 20px;
  }
}

.price-item .price-top {
  -webkit-box-shadow: 0 5px 30px 0 rgba(39, 39, 39, 0.15);
          box-shadow: 0 5px 30px 0 rgba(39, 39, 39, 0.15);
  padding: 50px 0 25px;
  background-color: #00b5ec;
  border-radius: 10px;
  position: relative;
  z-index: 0;
  margin-bottom: 33px;
}

@media (min-width: 768px) {
  .price-item .price-top {
    margin: 0 -20px;
    border-radius: 20px;
  }
}

.price-item .price-top:after {
  height: 50px;
  width: 100%;
  border-radius: 0 0 10px 10px;
  background-color: #00b5ec;
  position: absolute;
  content: '';
  left: 0;
  bottom: -17px;
  z-index: -1;
  -webkit-transform: skewY(5deg);
          transform: skewY(5deg);
  -webkit-box-shadow: 0 5px 10px 0 rgba(113, 113, 113, 0.15);
          box-shadow: 0 5px 10px 0 rgba(113, 113, 113, 0.15);
}

@media (min-width: 768px) {
  .price-item .price-top:after {
    border-radius: 0 0 20px 20px;
  }
}

.price-item .price-top * {
  color: #fff;
}

.price-item .price-top h2 {
  font-weight: 700;
}

.price-item .price-top h2 sup {
  top: 13px;
  left: -5px;
  font-size: 0.35em;
  font-weight: 500;
  vertical-align: top;
}

.price-item .price-content {
  padding: 30px;
  padding-bottom: 40px;
}

.price-item .price-content li {
  position: relative;
  margin-bottom: 15px;
  margin-left: 10px;
  margin-right: 10px;
  text-align: center;
}

@media (min-width: 992px) {
  .price-item .price-content li {
    padding-left: 28px;
    text-align: left;
  }
}

@media (min-width: 992px) {
  .price-item .price-content li i {
    position: absolute;
    left: 0;
    top: 3px;
  }
}

.price-item .price-content .zmdi-check {
  color: #28a745;
}

.price-item .price-content .zmdi-close {
  color: #f00;
}

.popular {
  background-color: #00b5ec;
}

.popular .price-top {
  background-color: #fff;
}

.popular .price-top:after {
  background-color: #fff;
}

.popular .price-top h4 {
  color: #101f41;
}

.popular .price-top h2, .popular .price-top span, .popular .price-top sup {
  color: #00b5ec;
}

.popular .price-content ul *,
.popular .price-content ul .zmdi-close, .popular .price-content ul .zmdi-check {
  color: #fff !important;
}

 

Friends in the end must run ng serve command into your terminal to run the angular 11 project.

Now we are done friends. If you have any kind of query, suggestion and new requirement then feel free to comment below.

Note: Friends, In this post, I just tell the basic setup and things, you can change the code according to your requirements.

I will appreciate that if you will tell your views for this post. Nothing matters if your views will be good or bad because with your views, I will make my next posts more good and helpful.

Jassa

Thanks

therichpost
the authortherichpost
Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know WordPress, Core php, Angularjs, Angular 14, Angular 15, Angular 16, Angular 17, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.