pbastowski / angular2-now

Angular 2 @Component syntax for Angular 1 apps
MIT License
145 stars 15 forks source link

Bug: cannot set specific restriction on component / directive #35

Closed kamilkisiela closed 8 years ago

kamilkisiela commented 8 years ago

Line: https://github.com/pbastowski/angular2-now/blob/meteor1.2/angular2-now.js#L181

For master branch it is the 171th line.

{
    restrict: options.restrict || (options.template + options.templateUrl) ? 'EA' : isClass ? 'C' : 'A'
}

so restrict option is basically skipped all the time.

pbastowski commented 8 years ago

Good pickup. It's probably been like that for a very long time. Most likely due to no one using the restrict option, but still, a very good pickup.

kamilkisiela commented 8 years ago

@pbastowski Do you mind if I post here each bug? So I can discuss it with you and fix it on my branch with unit testing?

I've done a lot of tests (for now it's a 58% of code coverage)

pbastowski commented 8 years ago

No problem, post away :)

I am not implementing the fixes on my side, because I expect you will have a PR for me when you're done.

Wow, that's excellent progress on your part re the tests.

kamilkisiela commented 8 years ago

@pbastowski Yes, I'm going to add PR for each bug :)

I will notify you when code coverage will be about 70%.