I suggest to translate directive attributes to custom namespace instead of 'ng'.
Using 'ng' in third-party extensions is unconventional, and I don't see it as a problem. The problem is that several core directives (ngModel, ngDisabled, etc.) are compiled on irrelevant elements, which is redundant or even harmful.
Another problem is that the code looks misleading when irrelevant ng-model or non-existing ng-* directives are featured.
Unprefixed loading attribute adds inconsistency. Was it by intention? There are other prefixed attributes that share the names with polymer elements (e.g ng-disabled).
I treated it like that for now. It is a bit dirty, but since the extension uses ES5, there are no computed properties, and regexp should be used anyway to prefix the attributes (it could be omitted if there were no unprefixed attributes like loading).
And the usage is
angular.module('ng-polymer-elements').constant('$ngPolymerPrefix', 'pe');
I guess that the extension could keep 'ng' as default prefix for now and feature breaking changes at any moment when appropriate.
And thank you for tremendous work, it is appreciated.
I suggest to translate directive attributes to custom namespace instead of 'ng'.
Using 'ng' in third-party extensions is unconventional, and I don't see it as a problem. The problem is that several core directives (ngModel, ngDisabled, etc.) are compiled on irrelevant elements, which is redundant or even harmful.
Another problem is that the code looks misleading when irrelevant
ng-modelor non-existingng-*directives are featured.Unprefixed
loadingattribute adds inconsistency. Was it by intention? There are other prefixed attributes that share the names with polymer elements (e.g ng-disabled).I treated it like that for now. It is a bit dirty, but since the extension uses ES5, there are no computed properties, and regexp should be used anyway to prefix the attributes (it could be omitted if there were no unprefixed attributes like
loading).And the usage is
I guess that the extension could keep 'ng' as default prefix for now and feature breaking changes at any moment when appropriate.
And thank you for tremendous work, it is appreciated.