- Install
npm
:$ sudo pacman -S npm
- Change
npm
default directory (permissions issue):
$ mkdir ~/.node_modules
$ npm config set prefix ~/.node_modules
$ echo 'export PATH=~/.node_modules/bin:PATH' >> ~/.bashrc
$ source ~/.bashrc
$ ng
- Install
angular-cli
:npm install -g @angular/cli
- Install
rxjs
:npm install -g rxjs
- Create a new project:
ng new <project-name>
- Run the server:
ng serve
- Create a new component:
ng generate component <component-name>
- Create a new service:
ng generate service <service-name>
- Install
angular-material
(User Interface):npm install @angular/material @angular/cdk @angular/animations
- Install
angulatics2
(Google Analytics):npm install angulartics2
- Install
flex-layout
(Responsiveness):npm install @angular/flex-layout
- Install
ngx-sharebuttons
(Share on social media):npm install @ngx-share/core @ngx-share/button font-awesome
- Install
ngx-highlightjs
(Code syntax highlighting):npm install ngx-highlightjs
- Install
ngx-page-scroll
(Scroll to content):npm install ngx-page-scroll
- Install
ngx-disqus
(Disqus comments):npm install ngx-disqus
Just replace the /src
folder using the content of this repo
$ ng build --prod --deploy-url=/
And a dist
folder will be created at the root of the project, where its static files will be served from /expenses
.
SCSS
is more suitable to customize the themes of Material
than CSS
. According to this tutorial, to switch to SCSS
:
$ ng set defaults.styleExt scss
If you get an error related to Node-sass
, the following command might fix it:
$ npm rebuild node-sass
Afterwards you need to reference the correct styles file in .angular-cli.json
:
"styles": [
"sass/styles.scss"
],