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.

syntax error on directive with replace = true #6979

Closed
@brettatoms

Description

@brettatoms

I'm not quite sure how to word this in the summary. What's happening if you define a directive with replace=true and the directive template with say an ng-click="" and then when you use the directive and also use ng-click="" the two values of ng-click get concatenated before being evaluated/parsed. This causes a parse error b/c the two statements are separated by a semicolon;

Here's the broken version without the semicolon on the ngClick callback where the directive is used: http://plnkr.co/edit/9M1fCD1NIy8qGmp9e3zQ?p=preview

Here's the working version where the semicolon is added: http://plnkr.co/edit/l7zLT3bwQdCYx6m5gaWe?p=preview

It seems like the expression from the directive template is always appended to the expression where the directive is used so the semicolon is needed where the directive is used.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions