-
Notifications
You must be signed in to change notification settings - Fork 354
Directive Aliases #382
Comments
👍 for the idea, but i am curious, about the implementation part.
|
In all seriousness, this was thought up in an attempt to tell developers that they should namespace EVERYTHING so that it won't be a big deal if you want to use a streamlined syntax instead (like AngularUI vs UIBootstrap). See #191 for a similar thread. |
Ohh, I should have explained little better. By priority, i ment the priority of the directive. Let's say someone creates an alias as I guess, it should be fine to override, if there is a name conflict. For 4, I ment allowing the user to specify the attrs as params in the config object. Then all that we need to do is |
Right now, if there are two directives with the same name they will both be On 26 January 2013 01:37, sudhakar [email protected] wrote:
|
Ah so I was right. Directives DO stack up. Dean Sofer On Saturday, January 26, 2013 at 1:54 AM, Pete Bacon Darwin wrote:
|
I decided to push a prototype: https://github.com/angular-ui/ui-alias |
That prototype does not work. Seems only limited to templates |
This is an idea for a new feature.
Lets say that EVERYONE prefixes their libs properly instead of imposing a global DSL:
Now, lets say that I want to create a DSL but I don't want to re-define all these directives.
What if you could alias and stack these directives together? (say upon module.config or adding a third-party lib as a dependency)
<tabs title="Hello">
would essentially be the same as<li bs-tooltip bs-tabs ui-reset ph-txt title="Hello">
This way, people won't have to wonder if they should use the global namespace when making their library (like we do for angular/ui-bootstrap)!
In addition, you could create an alias for various configurations of the same directives!
The text was updated successfully, but these errors were encountered: