문제

What am I missing?

app.directive('summaryAddress', [function () {

    return {
        scope: {
           address: '=summary-address'
        },
        template: "<h2>Billing Address</h2>" +
            "<span>{{address.flatNumber}}</span>"
    };

}]);

The output is just...

{{address.flatNumber}}

도움이 되었습니까?

해결책

Scope mapping needs to use the normalized camel case name of the attribute and not the form that it appears in the mark up.

pobo.directive('summaryAddress', [function () {

    return {
        scope: {
            address: '=summaryAddress'
        },
        template: "<h2>Billing Address</h2>" +
            "<span>{{address.flatNumber}}</span>"
    };

}]);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top