- In file '/angular/demo{#}/src/assets/sass/style.angular.scss' comment the next rows [8, 9]:
// @import "./core/vendors/plugins/prismjs";
// @import "./core/vendors/plugins/formvalidation";
-
Add 'rtl.config.js' file into project (path should be: '/angular/demo{#}/rtl.config.js').
-
In file 'package.json' add the next 'devDependencies':
"@types/sass-loader": "8.0.3",
"css-loader": "6.7.1",
"del": "6.0.0",
"mini-css-extract-plugin": "2.6.1",
"sass-loader": "13.0.2",
"webpack": "5.74.0",
"webpack-cli": "4.10.0"
- In file 'package.json' add the next scripts command:
"rtl": "webpack --config=rtl.config.js"
-
Find and replace next attributes in the project:
data-kt-menu-placement="bottom-start" => data-kt-menu-placement="bottom-end"
data-kt-menu-placement="right-start" => data-kt-menu-placement="left-start"
-
Run:
yarn install
- In file '/angular/demo{#}/src/index.html' change 'body' tag:
<body root id="kt_body" class="mat-typography" direction="rtl" dir="rtl" style="direction: rtl">
- Run:
yarn run rtl
- In file '/angular/demo{#}/src/styles.scss' file change RTL import to the LTL one (row 2):
/* You can add global styles to this file, and also import other style files */
// @import "./assets/sass/style.scss";
// Replace above style with this css file to enable RTL styles
// @import './assets/sass/plugins.scss';
@import "./assets/css/style.rtl.css";
@import "./assets/sass/style.angular.scss";
- Run:
ng serve
npm install del
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @angular-eslint/[email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/cli
npm ERR! dev @angular/cli@"14.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/cli@">= 13.0.0 < 14.0.0" from @angular-eslint/[email protected]
npm ERR! node_modules/@angular-eslint/schematics
npm ERR! dev @angular-eslint/schematics@"13.2.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/[email protected]
npm ERR! node_modules/@angular/cli
npm ERR! peer @angular/cli@">= 13.0.0 < 14.0.0" from @angular-eslint/[email protected]
npm ERR! node_modules/@angular-eslint/schematics
npm ERR! dev @angular-eslint/schematics@"13.2.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/ahmedalobed/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ahmedalobed/.npm/_logs/2022-08-04T07_47_44_888Z-debug-0.log