Skip to content

Commit 6a19ac3

Browse files
authored
angular 21 dev complete (#36) (#37)
1 parent ee632fd commit 6a19ac3

40 files changed

+3584
-3043
lines changed

.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/prod.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ jobs:
2222
- name: 🚚 Get latest code
2323
uses: actions/checkout@v4
2424

25-
- name: Install Node.js 22
25+
- name: Install Node.js 24
2626
uses: actions/setup-node@v4
2727
with:
28-
node-version: '22'
28+
node-version: '24'
2929

3030
- name: 🔨 Build Project
3131
run: |
32-
yarn
32+
yarn install
3333
yarn build-prod
3434
3535
- name: 📂 Deploy to Server

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Datta Able is offers everything you need to create dashboards. We have included
9797
## Technology Stack
9898

9999
- Bootstrap 5
100-
- Angular 18
100+
- Angular 21
101101
- Typescript
102102

103103
## Other Technologies

angular.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
"outputPath": "dist",
2222
"index": "src/index.html",
2323
"main": "src/main.ts",
24-
"polyfills": "src/polyfills.ts",
24+
"polyfills": [
25+
"@angular/localize/init"
26+
],
2527
"tsConfig": "tsconfig.app.json",
2628
"inlineStyleLanguage": "scss",
2729
"assets": ["src/favicon.ico", "src/assets", "src/fake-data"],

package.json

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "datta-able-free-angular-admin-template",
3-
"version": "6.2.0",
3+
"version": "6.3.0",
44
"author": "CodedThemes",
5+
"private": false,
56
"scripts": {
67
"ng": "ng",
78
"start": "ng serve",
@@ -13,45 +14,43 @@
1314
"lint:fix": "ng lint --fix",
1415
"prettier": "prettier --write ./src"
1516
},
16-
"private": false,
1717
"dependencies": {
18-
"@angular/animations": "20.0.5",
19-
"@angular/cdk": "20.0.4",
20-
"@angular/common": "20.0.5",
21-
"@angular/compiler": "20.0.5",
22-
"@angular/core": "20.0.5",
23-
"@angular/forms": "20.0.5",
24-
"@angular/localize": "20.0.5",
25-
"@angular/platform-browser": "20.0.5",
26-
"@angular/platform-browser-dynamic": "20.0.5",
27-
"@angular/router": "20.0.5",
28-
"@ng-bootstrap/ng-bootstrap": "19.0.0",
18+
"@angular/animations": "21.0.5",
19+
"@angular/cdk": "21.0.3",
20+
"@angular/common": "21.0.5",
21+
"@angular/compiler": "21.0.5",
22+
"@angular/core": "21.0.5",
23+
"@angular/forms": "21.0.5",
24+
"@angular/localize": "21.0.5",
25+
"@angular/platform-browser": "21.0.5",
26+
"@angular/platform-browser-dynamic": "21.0.5",
27+
"@angular/router": "21.0.5",
28+
"@ng-bootstrap/ng-bootstrap": "20.0.0",
2929
"@popperjs/core": "2.11.8",
30-
"apexcharts": "4.7.0",
31-
"bootstrap": "5.3.7",
32-
"ng-apexcharts": "1.16.0",
30+
"apexcharts": "5.3.6",
31+
"bootstrap": "5.3.8",
32+
"ng-apexcharts": "2.0.4",
3333
"ngx-scrollbar": "18.0.0",
3434
"rxjs": "~7.8.2",
3535
"screenfull": "6.0.2",
36-
"tslib": "2.8.1",
37-
"zone.js": "~0.15.1"
36+
"tslib": "2.8.1"
3837
},
3938
"devDependencies": {
40-
"@angular-devkit/build-angular": "20.0.4",
41-
"@angular-eslint/builder": "20.1.1",
42-
"@angular-eslint/eslint-plugin": "20.1.1",
43-
"@angular-eslint/eslint-plugin-template": "20.1.1",
44-
"@angular-eslint/schematics": "20.1.1",
45-
"@angular-eslint/template-parser": "20.1.1",
46-
"@angular/cli": "20.0.4",
47-
"@angular/compiler-cli": "20.0.5",
48-
"@eslint/eslintrc": "3.3.1",
49-
"@eslint/js": "9.29.0",
50-
"@types/node": "24.0.4",
51-
"@typescript-eslint/eslint-plugin": "8.35.0",
52-
"@typescript-eslint/parser": "8.35.0",
53-
"eslint": "9.29.0",
54-
"prettier": "3.6.1",
55-
"typescript": "5.8.3"
39+
"@angular-devkit/build-angular": "21.0.3",
40+
"@angular-eslint/builder": "21.1.0",
41+
"@angular-eslint/eslint-plugin": "21.1.0",
42+
"@angular-eslint/eslint-plugin-template": "21.1.0",
43+
"@angular-eslint/schematics": "21.1.0",
44+
"@angular-eslint/template-parser": "21.1.0",
45+
"@angular/cli": "21.0.3",
46+
"@angular/compiler-cli": "21.0.5",
47+
"@eslint/eslintrc": "3.3.3",
48+
"@eslint/js": "9.39.1",
49+
"@types/node": "25.0.1",
50+
"@typescript-eslint/eslint-plugin": "8.49.0",
51+
"@typescript-eslint/parser": "8.49.0",
52+
"eslint": "9.39.1",
53+
"prettier": "3.7.4",
54+
"typescript": "5.9.3"
5655
}
5756
}

src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<router-outlet><app-spinner></app-spinner></router-outlet>
1+
<router-outlet><app-spinner /></router-outlet>

src/app/demo/dashboard/dashboard.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ <h6 class="text-muted">
148148
</h6>
149149
</td>
150150
<td>
151-
<a href="javascript:" class="badge me-2 theme-bg2 text-white f-12">Reject</a>
152-
<a href="javascript:" class="badge me-2 theme-bg text-white f-12">Approve</a>
151+
<a href="javascript:void(0)" class="badge me-2 theme-bg2 text-white f-12">Reject</a>
152+
<a href="javascript:void(0)" class="badge me-2 theme-bg text-white f-12">Approve</a>
153153
</td>
154154
</tr>
155155
}

src/app/demo/pages/authentication/auth-signin/auth-signin.component.html

Lines changed: 66 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,73 @@
88
</div>
99
<div class="card">
1010
<div class="card-body text-center">
11-
<div class="mb-4">
12-
<i class="feather icon-unlock auth-icon"></i>
13-
</div>
14-
<h3 class="mb-4">Login</h3>
15-
<div class="input-group mb-3">
16-
<input type="email" class="form-control" placeholder="Email" />
17-
</div>
18-
<div class="input-group mb-4">
19-
<input type="password" class="form-control" placeholder="Password" />
20-
</div>
21-
<div class="form-group text-start mb-4">
22-
<div class="checkbox checkbox-fill d-inline">
23-
<input type="checkbox" name="checkbox-fill-1" id="checkbox-fill-a1" checked="" />
24-
<label for="checkbox-fill-a1" class="cr">Save Details</label>
11+
<form (ngSubmit)="onSubmit($event)">
12+
<div class="mb-4">
13+
<i class="feather icon-unlock auth-icon"></i>
2514
</div>
26-
</div>
27-
<button class="btn btn-primary mb-4">Login</button>
28-
<p class="mb-2 text-muted">
29-
Forgot password?
30-
<a href="javascript:">Reset</a>
31-
</p>
15+
<h3 class="mb-4">Login</h3>
16+
<div class="input-group mb-3">
17+
<input
18+
type="email"
19+
class="form-control"
20+
id="floatingInput"
21+
[class.is-invalid]="submitted() && loginForm.email().invalid()"
22+
placeholder="Email Address"
23+
[field]="loginForm.email"
24+
/>
25+
@if (submitted() && loginForm.email().invalid()) {
26+
<div class="invalid-feedback">
27+
@for (error of loginForm.email().errors(); track error.kind) {
28+
<div>{{ error.message }}</div>
29+
}
30+
</div>
31+
}
32+
</div>
33+
<div class="input-group mb-4">
34+
@if (!showPassword()) {
35+
<input
36+
type="password"
37+
id="password"
38+
class="form-control"
39+
[field]="loginForm.password"
40+
[class.is-invalid]="submitted() && loginForm.password().errors().length > 0"
41+
placeholder="Password (min. 8 characters)"
42+
/>
43+
} @else {
44+
<input
45+
type="text"
46+
id="password"
47+
class="form-control"
48+
[field]="loginForm.password"
49+
[class.is-invalid]="submitted() && loginForm.password().errors().length > 0"
50+
placeholder="Password (min. 8 characters)"
51+
/>
52+
}
53+
<i
54+
[ngClass]="showPassword() ? 'feather icon-eye' : 'feather icon-eye-off'"
55+
id="togglePassword"
56+
(click)="togglePasswordVisibility()"
57+
></i>
58+
@if (submitted() && loginForm.password().errors().length > 0) {
59+
<div class="invalid-feedback">
60+
@for (error of loginForm.password().errors(); track error.kind) {
61+
<div>{{ error.message }}</div>
62+
}
63+
</div>
64+
}
65+
</div>
66+
<div class="form-group text-start">
67+
<div class="checkbox checkbox-fill d-inline">
68+
<input type="checkbox" name="checkbox-fill-1" id="checkbox-fill-a1" checked="" />
69+
<label for="checkbox-fill-a1" class="cr">Save Details</label>
70+
</div>
71+
</div>
72+
<button type="submit" class="btn btn-primary mb-4">Login</button>
73+
<p class="mb-2 text-muted">
74+
Forgot password?
75+
<a [routerLink]="['#']">Reset</a>
76+
</p>
77+
</form>
3278
<p class="mb-0 text-muted">
3379
Don’t have an account?
3480
<a [routerLink]="['/register']">Sign up</a>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#togglePassword {
2+
cursor: pointer;
3+
position: absolute;
4+
right: 15px;
5+
top: 50%;
6+
transform: translateY(-50%);
7+
8+
::ng-deep.datta-rtl & {
9+
right: auto;
10+
left: 15px;
11+
}
12+
}
Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,47 @@
1-
import { Component } from '@angular/core';
1+
// angular import
2+
import { ChangeDetectorRef, Component, inject, signal } from '@angular/core';
3+
import { CommonModule } from '@angular/common';
24
import { RouterModule } from '@angular/router';
5+
import { email, Field, form, minLength, required } from '@angular/forms/signals';
6+
7+
// project import
8+
import { SharedModule } from 'src/app/theme/shared/shared.module';
39

410
@Component({
511
selector: 'app-auth-signin',
6-
imports: [RouterModule],
12+
imports: [CommonModule, RouterModule, SharedModule, Field],
713
templateUrl: './auth-signin.component.html',
814
styleUrls: ['./auth-signin.component.scss']
915
})
10-
export class AuthSigninComponent {}
16+
export class AuthSigninComponent {
17+
private cd = inject(ChangeDetectorRef);
18+
19+
submitted = signal(false);
20+
error = signal('');
21+
showPassword = signal(false);
22+
23+
loginModal = signal<{ email: string; password: string }>({
24+
email: '',
25+
password: ''
26+
});
27+
28+
loginForm = form(this.loginModal, (schemaPath) => {
29+
required(schemaPath.email, { message: 'Email is required' });
30+
email(schemaPath.email, { message: 'Enter a valid email address' });
31+
required(schemaPath.password, { message: 'Password is required' });
32+
minLength(schemaPath.password, 8, { message: 'Password must be at least 8 characters' });
33+
});
34+
35+
onSubmit(event: Event) {
36+
this.submitted.set(true);
37+
this.error.set('');
38+
event.preventDefault();
39+
const credentials = this.loginModal();
40+
console.log('login user logged in with:', credentials);
41+
this.cd.detectChanges();
42+
}
43+
44+
togglePasswordVisibility() {
45+
this.showPassword.set(!this.showPassword());
46+
}
47+
}

0 commit comments

Comments
 (0)