Skip to content

Commit

Permalink
feat: Angular 19 support (#600)
Browse files Browse the repository at this point in the history
* Update dependencies to angular 19 and uirouter/angular 16.

* Add `standalone: false` for UIViewNgUpgrade component in angular-hybrid.ts

* Update example package.json dependencies to angular 19.

* Improve example dependencies.

* Add standalone: false for example main.ts component.

* chore: update dependencies

---------

Co-authored-by: Egor Boaghi <[email protected]>
Co-authored-by: wawyed <[email protected]>
  • Loading branch information
3 people authored Jan 14, 2025
1 parent 597600c commit 059d12d
Show file tree
Hide file tree
Showing 5 changed files with 1,253 additions and 1,514 deletions.
37 changes: 16 additions & 21 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,26 @@
]
},
"dependencies": {
"@angular/animations": "^18.1.0",
"@angular/common": "^18.1.0",
"@angular/compiler": "^18.1.0",
"@angular/core": "^18.1.0",
"@angular/platform-browser": "^18.1.0",
"@angular/platform-browser-dynamic": "^18.1.0",
"@angular/upgrade": "18.1.0",
"@angular/animations": "^19.0.5",
"@angular/common": "^19.0.5",
"@angular/compiler": "^19.0.5",
"@angular/compiler-cli": "^19.0.5",
"@angular/core": "^19.0.5",
"@angular/platform-browser": "^19.0.5",
"@angular/platform-browser-dynamic": "^19.0.5",
"@angular/upgrade": "^19.0.0",
"@types/angular": "^1.8.9",
"@types/jquery": "^3.2.16",
"@uirouter/angular": "14.0.0",
"@uirouter/angular": "^16.0.0",
"@uirouter/angular-hybrid": "latest",
"@uirouter/angularjs": "1.1.0",
"@uirouter/core": "6.1.0",
"@uirouter/rx": "1.0.0",
"@uirouter/angularjs": "1.1.1",
"@uirouter/core": "^6.1.1",
"@uirouter/rx": "^1.0.0",
"angular": "1.8.3",
"rxjs": "^7.4.0",
"tslib": "2.6.2",
"typescript": "5.4.5",
"zone.js": "0.14.4"
},
"overrides": {
"@uirouter/core": "6.1.0"
},
"resolutions": {
"@uirouter/core": "^6.1.0"
"rxjs": "~7.8.0",
"tslib": "^2.8.1",
"typescript": "~5.6.3",
"zone.js": "~0.15.0"
},
"devDependencies": {
"@uirouter/cypress-runner": "^3.0.0",
Expand Down
1 change: 1 addition & 0 deletions example/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ app.component('ng1Component', {
<a uiSref="app">Back to app</a>
<ui-view></ui-view>
`,
standalone: false,
})
export class Ng2Component {
ngOnInit() {
Expand Down
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,43 @@
]
},
"peerDependencies": {
"@angular/core": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
"@angular/upgrade": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
"@uirouter/angular": "^14.0.0",
"@angular/core": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"@angular/upgrade": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"@uirouter/angular": "^16.0.0",
"@uirouter/angularjs": "^1.0.30",
"@uirouter/core": "^6.1.0",
"@uirouter/core": "^6.1.1",
"angular": "^1.5.0"
},
"resolutions": {
"@uirouter/core": "^6.1.0"
},
"devDependencies": {
"@angular/animations": "^18.0.6",
"@angular/common": "^18.0.6",
"@angular/compiler": "^18.0.6",
"@angular/compiler-cli": "^18.0.6",
"@angular/core": "^18.0.6",
"@angular/platform-browser": "^18.0.6",
"@angular/platform-browser-dynamic": "^18.0.6",
"@angular/upgrade": "^18.0.6",
"@angular/animations": "^19.0.5",
"@angular/common": "^19.0.5",
"@angular/compiler": "^19.0.5",
"@angular/compiler-cli": "^19.0.5",
"@angular/core": "^19.0.5",
"@angular/platform-browser": "^19.0.5",
"@angular/platform-browser-dynamic": "^19.0.5",
"@angular/upgrade": "^19.0.0",
"@types/angular": "^1.8.9",
"@types/jquery": "^3.5.6",
"@uirouter/angular": "^14.0.0",
"@uirouter/angular": "^16.0.0",
"@uirouter/angularjs": "^1.1.0",
"@uirouter/core": "^6.1.0",
"@uirouter/core": "^6.1.1",
"@uirouter/publish-scripts": "^2.6.3",
"@uirouter/rx": "^1.0.0",
"angular": "^1.8.3",
"husky": "^4.3.8",
"ng-packagr": "^18.0.0",
"prettier": "^2.3.2",
"pretty-quick": "^2.0.1",
"rxjs": "^7.4.0",
"rxjs-compat": "^6.6.7",
"ng-packagr": "^19.0.1",
"prettier": "^2.8.8",
"pretty-quick": "^3.3.1",
"rxjs": "~7.8.0",
"rxjs-compat": "^6.5.4",
"shx": "^0.3.3",
"typescript": "5.4.5",
"tslib": "2.6.2",
"zone.js": "^0.14.4"
"typescript": "~5.6.3",
"tslib": "^2.8.1",
"zone.js": "~0.15.0"
},
"distDir": "dist",
"sideEffects": true,
Expand Down
3 changes: 2 additions & 1 deletion src/angular-hybrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function objectFactory() {
* </div>
* ```
*
* This adapter exposes exposes the parent view context (ParentUIViewInject)
* This adapter exposes the parent view context (ParentUIViewInject)
* as an ng2 DI Provider, which the nested ng2 UIView requires.
*
* It gets the ParentUIViewContext information (from the parent ng1 ui-view) by walking
Expand All @@ -126,6 +126,7 @@ export function objectFactory() {
// provide a blank object as PARENT_INJECT.
// The component will add property getters when it is constructed.
viewProviders: [{ provide: UIView.PARENT_INJECT, useFactory: objectFactory }],
standalone: false,
})
export class UIViewNgUpgrade {
// The ui-view's name (or '$default')
Expand Down
Loading

0 comments on commit 059d12d

Please sign in to comment.