ellamaolson / ngMigration-Assistant

An analysis tool to determine which migration path from AngularJS to Angular is right for you.
198 stars 24 forks source link

Assumes 1 component / controller per file #8

Closed kfeinUI closed 5 years ago

kfeinUI commented 5 years ago

The component and controller counts presently assume that there is only 1 defined per file, but that's not a given. It should be counting all matches.

For example, my ES code base has the component and controller bodies exported. Module files then import them and feed them into the angular module.

angular.module('moduleName', [])
.component(Component1)
.component(Component2)
.controller(Controller1)
.controller(Controller2)

Naturally there are other valid approaches with multiple in a file that are fair game.