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.

require in directive DDO only causes an error if the DDO also includes a link function #11198

Closed
@bborowin

Description

@bborowin

Repro: make a simple app w/this custom directive:

foo.directive('bar', function() {
  return {
    scope: false,
    require: 'your mom',
    template: '<span>foobar</span>',
    //link: function() {}
  };
});

Expected: compile pukes on require not matched
Actual: everything compiles fine

Related SO question is here

As far as I can tell, it's because the getController function is only called from pre and post, which doesn't happen when a link function is not specified in the DDO.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions