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.

function templateUrl not $eval attributes? #7466

@zxcabs

Description

@zxcabs

Hi,
Attributes not $eval when use function in templateUrl.

Here example:

angular
    .module('app', [])
    .directive('drFoo', [
        function () {
            return {
                templateUrl: function (e, attr) {
                    console.log(attr.template); // => {{ template }}
                    return atrr.template;
                }
            };
        }
    ]);
<div ng-app="app" ng-init="template = 'foo.html'">
    <div dr-foo template="{{ template }}"></div>
</div>

jsfiddle

It reproduced in v1.2.16 and v1.3.0-beta8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions