5 min Quick Start:

Prerequisites:

Before you use MDB Angular make sure you have installed @angular/cli and typescript npm packages globally. Those packages are necessary to develop Angular application.

To install @angular/cli execute below command in your command line

        npm install -g @angular/cli
    

To install typescript execute below command in your command line

        npm install -g typescript
    

Manual installation:

Step 1: If you haven't downloaded MDB Angular archive yet, go to Getting Started page and download it now.

Step 2: Unzip downloaded package and open your unpacked directory.

Step 3: For PRO version open package.json file and change REPLACE_WITH_YOUR_TOKEN to your private gitlab access token in "ng-uikit-pro-standard" dependency path.

To install the dependencies, depending on your node module manager, run:


          $ npm install
      

          $ yarn
      

Step 4: Now after you've downloaded everything it's time to write the second command which let us serve our app on localhost using:

        
            ng serve --o
        
    

Step 5: When you check what is served at your port 4200 you should see app default screen.

Step 6: Explore our documentation (menu on the left). Choose components you like, copy it to your project and compose your website. And yes, it's that simple!

NPM installation:

If you encounter problems installing the latest version, please refer to our migration guide. Migration Guide

Step 1:  Create new angular project using Angular CLI command:

ng new your-angular-project --style=scss

Step 2:  cd your-angular-project

Step 3:  GitHub npm install

npm i angular-bootstrap-md --save

Step 4: to app.module.ts add


import { NgModule } from '@angular/core';
import { MDBBootstrapModule } from 'angular-bootstrap-md';

@NgModule({
    imports: [
        MDBBootstrapModule.forRoot()
    ]
});

Step 5: Make sure that styleExt is set to "scss" in angular.json file, if not change:

"schematics": {
    "@schematics/angular:component": {
      "styleext": "css"
    }
  }
to
"schematics": {
    "@schematics/angular:component": {
      "styleext": "scss"
    }
  }


Step 6: Make sure you have src/styles.scss. If you have src/styles.css instead, rename it to .scss.

if you want to change styles in existing project you can use ng set defaults.styleExt scss

Step 7: add below lines to angular.json:


"styles": [
    "node_modules/font-awesome/scss/font-awesome.scss",
    "node_modules/angular-bootstrap-md/scss/bootstrap/bootstrap.scss",
    "node_modules/angular-bootstrap-md/scss/mdb-free.scss",
    "src/styles.scss"
],
"scripts": [
  "node_modules/chart.js/dist/Chart.js",
  "node_modules/hammerjs/hammer.min.js"
],

Step 8: install external libs

npm install -–save chart.js@2.5.0 @types/chart.js @types/chart.js font-awesome hammerjs angular5-csv

Step 9: Run server

ng serve --o

NOTE:It is possible to install Bootstrap from npm package. Just type npm install bootstrap --save.

Using Bootstrap from npm requires to change location of bootstrap.scss file in angular.json file
from
"node_modules/angular-bootstrap-md/scss/bootstrap/bootstrap.scss
to
"node_modules/bootstrap/scss/bootstrap.scss.

Step 1:  Create new angular project using Angular CLI command:

ng new your-angular-project --style=scss

Step 2:  cd your-angular-project

Step 3:  GitLab npm install

  1. Visit  https://git.mdbootstrap.com  and log in.
  2. From top right corner click at your avatar and choose "Setting → Access Tokens" or navigate directly to:  https://git.mdbootstrap.com/profile/personal_access_tokens
  3. Provide a Name for your token and choose "api" from scopes. Then click "Create personal access token" 
  4. Once your token will be generated make sure to copy it and store in safe place. You won't be able to access it again. In case of lose you will have to generate new token again
  5. Navigate to given repository, switch GIT to HTTP and copy it's url i.e. :  http://git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git
  6. Adjust following link as per below: 
    "git+https://oauth2: + access _token + @ + repo address" 

    i.e. 

    git+https://oauth2:sBBYpBsf-mcbHgYHUFa7@git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git
  7. Within existing npm project run: 
    npm install git+https://oauth2:sBBYpBsf-mcbHgYHUFa7@git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git --save

    if you don't have existing npm project you should crate it first (npm init)

    alternatively you can update your dependencies in package.json like below : 

     "dependencies": {
       "ng-uikit-pro-standard": "git+https://oauth2:sBBYpBsf-mcbHgYHUFa7@git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git"
      }


    and run npm install 


Step 4:  add following imports and providers to your app.module.ts:


import { MDBBootstrapModulesPro } from 'ng-uikit-pro-standard';
import { MDBSpinningPreloader } from 'ng-uikit-pro-standard';
import { NgModule } from '@angular/core';
...
imports: [ ... MDBBootstrapModulesPro.forRoot(), ... ], providers: [ ... MDBSpinningPreloader, ... ]

Step 5: Into your angular.json file   add styles


"styles": [
"node_modules/font-awesome/scss/font-awesome.scss",
"node_modules/ng-uikit-pro-standard/assets/scss/bootstrap/bootstrap.scss",
"node_modules/ng-uikit-pro-standard/assets/scss/mdb.scss", 
"src/styles.scss"
],
and scripts

"scripts": [
"node_modules/chart.js/dist/Chart.js",
"node_modules/easy-pie-chart/dist/easypiechart.js",
"node_modules/screenfull/dist/screenfull.js",
"node_modules/hammerjs/hammer.min.js"
],

Step 6: Install 3rd party libraries using 
npm i --save chart.js@2.5.0 @types/chart.js easy-pie-chart@2.1.7 hammerjs@2.0.8 screenfull@3.3.0 font-awesome angular5-csv

OR
to package.json add:

"chart.js": "^2.5.0",
"easy-pie-chart": "^2.1.7",
"hammerjs": "^2.0.8",
"screenfull": "3.3.0",
"font-awesome": "^4.7.0"
and then use npm i

Step 7: if you want to use maps you will have to npm i --save @agm/core and then add import { AgmCoreModule } from '@agm/core'; to your app.module. To use them you will also need add it to your imports AgmCoreModule.forRoot({ apiKey: 'Your_api_key' })

Step 8: ng serve -o

NOTE:It is possible to install Bootstrap from npm package. Just type npm install bootstrap --save.

Using Bootstrap from npm requires to change location of bootstrap.scss file in angular.json file
from
"node_modules/ng-mdb-pro/scss/bootstrap/bootstrap.scss
to
"node_modules/bootstrap/scss/bootstrap.scss.

Snapshot builds (developer versions):

There's always possibility to download snapshot build (developer versions). Those build are available to download from Github (MDB Angular Free) and from Gitlab (MDB Angular Pro).

Downloading snapshot build from GitHub: git clone -b dev https://github.com/mdbootstrap/Angular-Bootstrap-with-Material-Design .

Downloading snapshot build from GitLab: npm install git+https://oauth2:<your-auth-token>@git.mdbootstrap.com/mdb/angular/ng-uikit-pro-standard.git#dev --save

Please note that the developer versions are the ones we are working on when writing patches. So there is a chance that this versions may cause problems in your project because it is not yet marked as stable.