Skip to content Skip to sidebar Skip to footer

Unable To Pass Parameter To Angular Directive

I want to initiate a third party control (bootstrap-select) after a collection has been assigned to a source variable. For that I am using a directive and watching a collection lik

Solution 1:

Collection-name is an attribute on the select-element and can't just be watched by using scope.collectionName since that will return undefined. You can get the value from the 'collection-name' attribute by using the following line in your link-function:

scope.collectionName = attrs.collectionName;

Not sure if it works for you since I have no data, but it probably helps you further.

Post a Comment for "Unable To Pass Parameter To Angular Directive"