A
A
Abc Edc2015-12-25 14:50:09
Angular
Abc Edc, 2015-12-25 14:50:09

Why doesn't $Compile compile?

Such problems have never arisen, now something mysticism has gone

compileScope = $rootScope.$new();
 compileScope.from = from.format('dddd MMMM DD');
                compileScope.to = to.format('dddd MMMM DD');
                compileScope.y = y || null;
                console.log(compileScope);
                var element = $compile(angular.element(
                    '<div class="tooltip-chart">' +
                    '<p>{{from}} - {{to}}</p>' +
                    '<p ng-if="y">USD: <bold style="color: #000000">{{y}}</bold></p>' +
                    '</div>'
                ))(compileScope);

in
outerHTML output: " {{from}} - {{to}}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zakharov Alexander, 2015-12-25
@gleber1

No "angular.element" needed. $compile compiles html text.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question