Hi Brice,
Did you try (drum-roll..) ng-attr-component-id?
It’s just there, only the documentation is on a strange place. Not sure if
that’s on purpose!
May I ask why you are naming an crucial part of your (material) design
dynamically? Are you generating sub-modules on the fly?
hmm. I just looked into the source of angularMD. A dirty hack that solves
your problem is quite easy.
something like:
function mdSideNavName () {
var ddo = {
restrict: 'A',
require: 'md-sidenav',
link: function (scope,elm,attr,mdSideNav) {
attr.$observe('mdSideNavName', function (name){
if (name) { //only regiser a new existing name!
mdSideNav.$$handle = name;
}
})
}
};
returm ddo
}
angular.module('mdHacks')
.directive('mdSideNavName', mdSideNavName);
I din’t try above code, so it might need some fiddling before actually
working.
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.