Page tree
Skip to end of metadata
Go to start of metadata

To install and use the Smart Components library in a fresh project that was generated by angular-cli, follow these steps:Configure npm to use the Consultingwerk NPM registry: 

1. Configure npm to use the Consultingwerk NPM registry (you should have your NPM credentials at hand):

npm login --registry=http://npm.consultingwerkcloud.com --scope=@consultingwerk


2. Install the SmartComponent Library Installer if you have not already done so:

npm install -g @consultingwerk/smartcomponents-cli

3. Create your new project by running:

ng new <project_name>

Answers to prompt questions:

  • Would you like to add Angular routing? YES
  • Which stylesheet format would you like to use? CSS

4. Switch into the new project directory:

cd <project_name>


5. Install the SmartComponent Library (this will update your package dependencies, install them and make necessary changes to angular.json):

scl install

Answers to prompt questions:

  • Would you like to login to the Consultingwerk npm registry? YES
  • Consultingwerk NPM registry username: training
  • Consultingwerk NPM registry password: Consultingwerk2018
  • Consultingwerk NPM registry email: info@consultingwerk.de
  • Warning! This WILL make changes to your package.json and angular.json files. Are you sure you want to continue? YES

  • Please enter your service URI: http://localhost:30010

  • Authentication Type: FORMS

  • Please enter your username: demo
  • Please enter your password: demo
  • Would you like to save this configuration? Your password will be encrypted and stored outside of your project. YES
  • Please enter your module codes, separated by commas: Web2 Demo
  • Would you like to generate a root component for your app? YES
  • Root Component name: CustomRoot
  • Please enter the title that should be displayed in the page header: Training App
  • What is the name of your company? Your company name
  • What is your company's website? Your company website (including http(s)://)

That's it! Provided your SmartComponents Backend is up and running, your application should be ready to display a login screen, a menu and information about the currently signed in user.