8000 bindToController does not bind correctly for multiple directives · Issue #11343 · angular/angular.js · GitHub
[go: up one dir, main page]

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.
bindToController does not bind correctly for multiple directives #11343
Closed
@jtorbicki

Description

@jtorbicki

The problem occurs when defining multiple directives on the same element. All of the directives use bindToController as an object and scope: true. Only the first directive's controller gets scope bound.

Here is a fiddle showing the bug: https://jsfiddle.net/rds5muzk/

Current console output:

first = 2
second = undefined

Expected console output:

first = 2
second = 4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0