Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

widget compile function is not injected and gets the element twice #670

Closed
@esprehn

Description

@esprehn
angular.widget('example', function(compileElement1,compileElement2) {
  assert(compileElement1 == compileElement2); // ???
  return function(instanceElement) {
    // ...
  };
}, {$inject: ['$defer']});

The $inject doesn't do anything here like it would on services, and the compile function has two arguments and both are the jquery wrapped element.

It's lame to need to use the angular.extend trick to get injection in the instance function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions