Tech Junkie Blog - Real World Tutorials, Happy Coding!: ASP.NET Core : Add jQuery, Bootstrap, AngularJS Using bower.json

Wednesday, July 13, 2016

ASP.NET Core : Add jQuery, Bootstrap, AngularJS Using bower.json

In this blog post we are going to add the jQuery, AngularJS, and bootstrap libraries to our ASP.NET Core application.  Normally we will use NuGet to bring in these libraries but ASP.NET Core gives you the option to use bower to configure the dependencies that you will need on the client-side.

Here are the steps to import the client-side dependencies into our project:

1. First let's make bower.json part of the "NorthwindCafe.Web" project, click on the "Show All Files" icon in solution explorer, then right click on the bower.json file, and then choose "Show in Solution Explorer"

2.  Open the bower.json file the markup should look like this

{
 "name": "asp.net",
 "private": true,
 "dependencies": {
 }
}



3. Change the markup to look like the following
{
  "name": "asp.net",
  "private": true,
  "dependencies": {
    "bootstrap": "3.3.6",
    "angular": "~1.6.2",
    "jquery": "2.2.3"
  }
}


4. Save the bower.json file, once the file is saved a folder called "lib" will be created and will contain the bootstrap and AngularJS libraries






ASP.NET Core Posts:
  1. How To Create An ASP.NET Core Application From Scratch
  2. ASP.NET Core : Add jQuery, Bootstrap, AngularJS Using bower.json
  3. Enable ASP.NET Core to Serve Static Files
  4. Enable MVC On ASP.NET Core Application
  5. ASP.NET Core : Create Our First Controller and View  
  6. ASP.NET Core : Adding The Default View With _ViewStart.cshtml
  7. ASP.NET Core : Create A Responsive Layout With Bootstrap
  8. ASP.NET Core : Adding Font-Awesome For Northwind Cafe Navigation Icons
  9. ASP.NET Core : Add .json Configuration Files With Microsoft.Extensions.Configuration Library
  10. ASP.NET Core : Entity Framework Core Models For Northwind Cafe
  11. ASP.NET Core : Create The NothwindContext ( EntityFrameworkCore )
  12. ASP.NET Core : Configure project.json File To Support Entity Framework Core
  13. ASP.NET Core : Add NorthwindContext To Startup Class And Create Database
  14. ASP.NET Core: Seeding The NorwindCafe Database

1 comment:

Search This Blog