Thank you Daniel. pre-link function works perfectly. I really learned a lot from you. Thanks.
Ian On Fri, Jan 3, 2014 at 11:49 AM, Daniel Tabuenca <[email protected]> wrote: > You can use a pre-link function instead of the default post-link function > like this: > > app.directive("log", function() { > return { > link: { > pre: function(scope, element, attrs) { > console.log("PRE LINKED " + attrs.name); > }, > post: function(scope, element, attrs) { > console.log("POST LINKED " + attrs.name); > } > } > }; > }); > > The pre-link function is backward order from post-link function. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "AngularJS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/angular/jijWCUUQ3wg/unsubscribe. > To unsubscribe from this group and all its topics, 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/groups/opt_out. > -- 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/groups/opt_out.
