Adding a New Blog Template In Angular JS
Categories: Angular Angular JS
Adding a New Blog Template
Now we will add a simple template file and test run the application before adding code to the template. Right-click the NetBeans project folder and add a new HTML page named main.html in the partials folder. Replace the generated HTML code with the code shown here:
<!-- chapter5/main.html -->
Right-click the project folder and select “Run” from the menu. If you set up the project correctly, the browser should open with the following text displayed: “This is a blog post about AngularJS. We will cover how to build a blog and how to add comments to the blog post.” This tells us our application is properly configured. Now we will use Twitter Bootstrap and HTML to build a menu and main page for our blog.
First, we need to add three more folders and some additional Twitter Bootstrap files to the project.
We will add all the Bootstrap files here, although much of Bootstrap is not actually used in this project. Do the following:
1. Add a subfolder named css under the Site Root folder.
2. Add a subfolder named fonts under the Site Root folder.
3. Add a subfolder named lib-css under the Site Root folder.
4. Copy the bootstrap-theme.min.css and bootstrap.min.css files into the lib-css folder.
5. Copy the following files to the fonts folder: