Skip to content

Commit 738bf4c

Browse files
committed
feat(angular-18): added angular 18 support
1 parent b8bdfb5 commit 738bf4c

File tree

6 files changed

+40056
-16102
lines changed

6 files changed

+40056
-16102
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ Thumbs.db
5454
.angular
5555

5656
.nx/cache
57+
.nx/workspace-data

apps/ng2-charts-demo/src/styles.scss

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,41 @@
66
@include mat.core();
77

88
// Define a light theme
9-
$light-theme: mat.define-light-theme(
9+
$light-theme: mat.m2-define-light-theme(
1010
(
1111
color: (
12-
primary: mat.define-palette(mat.$deep-purple-palette),
13-
accent: mat.define-palette(mat.$amber-palette),
12+
primary: mat.m2-define-palette(mat.$m2-deep-purple-palette),
13+
accent: mat.m2-define-palette(mat.$m2-amber-palette),
1414
),
1515
// Only include `typography` and `density` in the default dark theme.
16-
typography: mat.define-typography-config(),
16+
typography: mat.m2-define-typography-config(),
1717
density: 0,
1818
)
1919
);
2020

2121
// Define a dark theme
22-
$dark-theme: mat.define-dark-theme(
22+
$dark-theme: mat.m2-define-dark-theme(
2323
(
2424
color: (
25-
primary: mat.define-palette(mat.$deep-purple-palette, 300, 100, 500),
26-
accent: mat.define-palette(mat.$amber-palette),
25+
primary: mat.m2-define-palette(mat.$m2-deep-purple-palette, 300, 100, 500),
26+
accent: mat.m2-define-palette(mat.$m2-amber-palette),
2727
),
2828
)
2929
);
3030

3131
@mixin page-header-color($theme) {
3232
// Get the color config from the theme.
33-
$color-config: mat.get-color-config($theme);
33+
$color-config: mat.m2-get-color-config($theme);
3434

3535
// Get the primary color palette from the color-config.
3636
$primary-palette: map.get($color-config, 'primary');
3737

3838
.bd-pageheader {
39-
color: mat.get-color-from-palette($primary-palette, '500-contrast');
39+
color: mat.m2-get-color-from-palette($primary-palette, '500-contrast');
4040
background-image: linear-gradient(
4141
to bottom,
42-
mat.get-color-from-palette($primary-palette, 700) 0,
43-
mat.get-color-from-palette($primary-palette, 500) 100%
42+
mat.m2-get-color-from-palette($primary-palette, 700) 0,
43+
mat.m2-get-color-from-palette($primary-palette, 500) 100%
4444
);
4545
}
4646
}

libs/ng2-charts-schematics/src/ng-add/steps/add-ng2-charts-provider.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ const PACKAGE_NAME = 'ng2-charts';
1111
* Patches `app.config.ts` by adding our provider
1212
*/
1313
export function addChartsProviderToMain(options: Schema): Rule {
14+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
15+
// @ts-ignore
1416
return async (host: Tree) => {
1517
const workspace = await getWorkspace(host);
1618
const projectName =
1719
options.project || (workspace.extensions['defaultProject'] as string);
20+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
21+
// @ts-ignore
1822
const project = getProjectFromWorkspace(workspace, options.project);
1923

2024
if (!project) {

0 commit comments

Comments
 (0)