Skip to content

Commit 505d3ff

Browse files
committed
chore(docs): add how-to for Font Awesome inclusion
1 parent 6d63bb4 commit 505d3ff

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Include [Font Awesome](http://fontawesome.io/)
2+
3+
[Font Awesome](http://fontawesome.io/) gives you scalable vector icons that can instantly be customized — size, color, drop shadow, and anything that can be done with the power of CSS.
4+
Create a new project and navigate into the project...
5+
```
6+
ng new my-app
7+
cd my-app
8+
```
9+
10+
Install the `font-awesome` library and add the dependency to package.json...
11+
```bash
12+
npm install --save font-awesome
13+
```
14+
15+
To add Font Awesome CSS icons to your app...
16+
```json
17+
// in angular-cli.json
18+
19+
"styles": [
20+
"styles.css",
21+
"../node_modules/font-awesome/css/font-awesome.css"
22+
]
23+
```
24+
25+
Run `ng serve` to run your application in develop mode, and navigate to `http://localhost:4200`.
26+
27+
To verify Font Awesome has been set up correctly, change `src/app/app.component.html` to the following...
28+
```html
29+
<h1>
30+
{{title}} <i class="fa fa-check"></i>
31+
</h1>
32+
```
33+
34+
After saving this file, return to the browser to see the Font Awesome icon next to the app title.
35+
36+
### More Info
37+
38+
- [Examples](http://fontawesome.io/examples/)

0 commit comments

Comments
 (0)