-
Notifications
You must be signed in to change notification settings - Fork 50
Building from Scratch
Travis Tidwell edited this page Jan 17, 2018
·
2 revisions
ng new angular-app-starterkit --style=sass
cd angular-app-starterkit```
ng serve
npm install --save font-awesome
-
.angular-cli.json
"apps": [ { ... "styles": [ "styles.scss", "../node_modules/font-awesome/scss/font-awesome.scss" ], "addons": [ "../node_modules/font-awesome/fonts/*.+(otf|eot|svg|ttf|woff|woff2)" ] ...
npm install --save [email protected]
npm install --save bootswatch
-
/src/styles.sass
@import "~bootswatch/dist/yeti/_variables.scss" @import "~bootstrap/scss/bootstrap.scss" @import "~bootswatch/dist/yeti/_bootswatch.scss"
ng g component home
-
/src/app/home/home.component.html
<div class="jumbotron"> <h3>Welcome to the Event Manager!</h3> </div>
-
/src/app/app.module.ts
... import { RouterModule } from '@angular/router'; ... @NgModule({ ... imports: [ ... RouterModule.forRoot([ { path: '', redirectTo: '/home', pathMatch: 'full' }, { path: 'home', component: HomeComponent } ]) ], ... })