Skip to content

handling Global calls within an object #49

@koryteg

Description

@koryteg

looks like as of right now the migrator just parses the JS for any declaration of the global namespace declared and removes it.

if it could change the global declaration to its correct instance call.
ie:

MyApp.ApplicationController = Ember.ObjectController.extend({
  updateCurrentPath: (function() {
    MyApp.set("currentPath", this.get("currentPath"));
  }).observes("currentPath")
});

should get changed to :

ApplicationController = Ember.ObjectController.extend({
  updateCurrentPath: (function() {
    this.container.lookup('application:main').set("currentPath", this.get("currentPath"));
  }).observes("currentPath")
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions