Installing Clarity in an Angular application
Let’s start creating our issue-tracking system by scaffolding a new Angular application:
ng new issue-tracker --defaults
We use the ng new
command of the Angular CLI to create a new Angular application with the following characteristics:
issue-tracker
: The name of the Angular application.--defaults
: This disables Angular routing for the application and sets the stylesheet format to CSS.
We now need to install the Clarity library in our Angular application:
- Navigate to the
issue-tracker
folder that was created and run the following command to install it:npm install @cds/core @clr/angular @clr/ui --save
- Open the
angular.json
file and add the Clarity CSS styles in thestyles
array:"styles": [ "node_modules/@clr/ui/clr-ui.min.css", "src/styles.css" ]
- Finally, import
ClarityModule
andBrowserAnimationsModule
in...