allenhwkim/angular-template

Support for ng-class,ng-style,ng-bind-html not present

pratikp91 opened this issue · 6 comments

Thanks for this library. But could you provide the above directives support

lf94 commented

I suggest just using regular templates.

<div class="{{ functionsThatOutputsCssClasses }}" style="{{ functionThatOutputsStyle }}"></div>

I remember I was able to output HTML too. I don't think angular-template cares about safe/unsafe HTML.

Keep in mind this is a VERY simple implementation of Angular 1.x.

lf94 commented

I would support these directives but only if I had some incentive...if you know what I mean, haha.

FDIM commented

I'll see what I can do. As it is now, ng-bind-html is not needed at all, you can just put your html in a variable and use it in a normal expression.

FDIM commented

I've introduced ht-class / ng-class support and restructured internals - now it's more modular and should be easy to extend. @pratikp91 are you up for a small challenge? :)

P.S. Package is not published to npm yet

@FDIM thanks, you are the man!

FDIM commented

I've just published v2.1.0 that includes support for ng-class, ng-style, ng-bind, ng-bind-html. The last 2 doesn't bring much value, but are still nice for compatibility.