Skip to content

Conversation

@JeffySam
Copy link

@JeffySam JeffySam commented Jan 4, 2026

Summary

This PR performs a strict migration of the Units Index state from AngularJS (CoffeeScript) to Angular.

The legacy AngularJS state and template have been fully removed and replaced with an Angular component and Angular-managed UI-Router state.

Changes

  • Removed legacy CoffeeScript state and template:

    • index.coffee
    • index.tpl.html
  • Added Angular replacements:

    • index.component.ts
    • index.component.html
    • index.component.scss
    • index.state.ts
    • Updated projects/states/index/index.coffee to remove dependency on deleted units/states/index/index.tpl.html (compatibility fix).
    • src/app/projects/states/index/index.coffee was updated only to remove templateUrl: "units/states/index/index.tpl.html" because that template is deleted as part of strict migration.
  • No CoffeeScript remains for units/index state.

  • Registered the new Angular state in doubtfire.states.ts

  • Updated dependent AngularJS state to delegate rendering to Angular

  • Added a minimal AngularJS shim module (index.ajs.module.ts) to preserve module dependency resolution (no logic, no state)

Migration Notes

  • This is a strict migration (no hybrid controller or template usage)
  • AngularJS is no longer responsible for routing or rendering this feature
  • The shim module exists solely to prevent AngularJS module resolution errors
  • Application boots successfully, login works, and unit pages load correctly

Testing

  • npm start
  • Verified login flow
  • Navigated to unit pages (/units/:unitId)
  • Confirmed Angular component renders and routing functions as expected

@SteveDala
Copy link

Hi Jeffy, is this Pull Request meant to be against the 9.x branch rather than the development branch?
image

@JeffySam JeffySam changed the base branch from development to 9.x January 12, 2026 08:28
@sabdosh
Copy link

sabdosh commented Jan 13, 2026

Hey Jeffy, I have had a look at your PR locally on my machine and ran the test as described. Login works, but navigating to a unit page triggers a runtime error in the console:

TypeError: Cannot read properties of undefined (reading 'activeTasks') originating from AngularJS (StateTaskResult.fromUiParams).
Screenshot 2026-01-13 214427
This indicates AngularJS state/controller code is still executing and the data contract with the new Angular Units Index component is currently broken.
Although the new Angular files are present, the migration is not clean at runtime and contradicts the PR’s testing claims that unit pages “load correctly”.
Recommend addressing this integration issue before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants