CoreUI 5 Angular Migration

Migration v4 to v5

Track and review changes to the CoreUI Angular components to help you migrate from v4 to v5.

CoreUI for Angular is the Angular version of CoreUI components library, so before read the following guide, please check also CoreUI 4 to 5 migration guide.

Project structure

The CoreUI v5 for Angular template project has been updated to standalone:

  • all the components, directives, and pipes have been converted to standalone,
  • unnecessary NgModules have been removed,
  • the project bootstrapping has been switched to standalone API.

In addition, there have been some changes to the project structure.

  • the routing modules have been replaced with routes,
  • the src/app/containers directory has been moved to src/app/layout.
coreui-angular-admin-template
├── src/
│   ├── app/
|   │   ├── icons/
|   │   ├── layout/
|   │   ├── views/
|   │   ├── app.component.ts
|   │   ├── app.config.ts
|   │   └── app.routes.ts
│   ├── assets/
│   ├── scss/
│   ├── ...
│   ├── main.ts
│   └── index.html

├── ...
├── tsconfig.json
├── angular.json
└── package.json

Template layout

src/app/layuut/default-layout/

CoreUI v4

─ c-sidebar
├─ c-sidebar-brand
├─ c-sidebar-nav
└─ c-sidebar-toggler
─ c-sidebar #aside
─ div class="wrapper"
├─ c-header
│  ├─ c-container fluid
│  ├─ c-header-divider
│  └─ c-container fluid
│     └─ c-breadcrumb-router
├─ div class="body"
│  └─ c-container
│     └─-router-outlet
└─ c-footer

CoreUI v5

├─ c-sidebar
│  ├─ c-sidebar-header
│  │  └─ c-sidebar-brand
│  ├─ c-sidebar-nav
│  └─ c-sidebar-footer
│     └─ cSidebarToggler
├─ div class="wrapper"
│  └─ app-header
│     ├─ c-container fluid
│     │  │─ cSidebarToggle
│     │  └─ c-header-nav
│     └─ c-container fluid
│        └─ c-breadcrumb-router
├─ div class="body"
│  └─ c-container
│     └─-router-outlet
├─ app-footer
└─ app-aside

Styles

See: src/scss/style.scss

Components

componentinputnotes
c-avatartextColoruses TextColorDirective via directive composition api
c-badgetextColoruses TextColorDirective via directive composition api
textBgColoruses TextBgColorDirective via directive composition api
c-cardtextColoruses TextColorDirective via directive composition api
textBgColoruses TextBgColorDirective via directive composition api
c-carouseldarkuses ThemeDirective via directive composition api
c-close-buttonwhitedeprecated property, use dark instead
c-close-buttondarkuses ThemeDirective via directive composition api
c-navvariantThe underline variant has been changed to underline-border
c-date-pickerinputDateFormatcustom date format function
inputDateParsecustom date parse function
showWeekNumberdisplay ISO week number
c-date-range-pickerinputDateFormatcustom date format function
inputDateParsecustom date parse function
showWeekNumberdisplay ISO week number
c-dropdowndarkuses ThemeDirective via directive composition api
cDropdownMenudarkuses ThemeDirective via directive composition api
c-navbarcolorSchemeuses ThemeDirective via directive composition api
c-offcanvasdarkuses ThemeDirective via directive composition api
c-progresssimplified HTML structure
c-sidebar-togglerremoved, use cSidebarToggler directive instead
c-smart-tableremoved _id internal property for items

Directives

directiveinputchangevalues
TextColorDirectivecTextColorremovedmuted, high-emphasis, medium-emphasis, disabled, high-emphasis-inverse, medium-emphasis-inverse, disabled-inverse
newprimary-emphasis, secondary-emphasis, success-emphasis, danger-emphasis, warning-emphasis, info-emphasis, light-emphasis, body, body-emphasis, body-secondary, body-tertiary, black, black-50, white, white-50