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.

directive compile function scope pollution (ngModel) #4889

@lukemadera

Description

@lukemadera

I have a forminput directive (originally adapted from @mhevery example here: http://stackoverflow.com/questions/10629238/angularjs-customizing-the-template-within-a-directive ) that no longer works in the new Angular 1.2.0. It works in Angular 1.2.0-rc.3.

jsFiddles here:
WORKS: 1.2.0-rc.3 http://jsfiddle.net/lukem/9BpSm/
does NOT work: 1.2.0 http://jsfiddle.net/lukem/S9rV2/

I read the changelog and saw there were numerous (breaking) changes to the compile function but it's not clear to me what is causing this new behavior and if it's intended to be this way (in which case how am I correctly supposed to do it?) or if it's a bug.

It DOES seem to work with template instead of compile so perhaps it's related to d0efd5e ? @vojtajina is there a reason isolate scope doesn't also apply to compile functions as well as the template 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