Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): add how-to for Font Awesome inclusion #3898

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 38 additions & 0 deletions docs/documentation/stories/include-font-awesome.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Include [Font Awesome](http://fontawesome.io/)

[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.
Create a new project and navigate into the project...
```
ng new my-app
cd my-app
```

Install the `font-awesome` library and add the dependency to package.json...
```bash
npm install --save font-awesome
```

To add Font Awesome CSS icons to your app...
```json
// in angular-cli.json

"styles": [
"styles.css",
"../node_modules/font-awesome/css/font-awesome.css"
]
```

Run `ng serve` to run your application in develop mode, and navigate to `http://localhost:4200`.

To verify Font Awesome has been set up correctly, change `src/app/app.component.html` to the following...
```html
<h1>
{{title}} <i class="fa fa-check"></i>
</h1>
```

After saving this file, return to the browser to see the Font Awesome icon next to the app title.

### More Info

- [Examples](http://fontawesome.io/examples/)