javascript - Why is my parameter not passed into the directive? -


i working in large project uses angularjs , html on client side.

some person has created directive takes argument variable 'places'. trying include new variable called 'ids', reason list 'ids' not passed outside of directive inside of directive - far can see.

'places' list values in outside of directive , inside. 'ids' has values in outside of directive.

i have read lot scopes, isolated scopes, extend , link function. gets complicated me when used this.

does have idea problem can be, or how can troubleshoot it?

directive('directivename', ['$location', '$routeparams', '$filter', function ($location, $routeparams, $filter) {     return {         restrict: 'e',         scope: {             ids: '=',             places: '='         },         transclude : true,         templateurl: 'partials/name/directivenameinsidehtml.html',         link: function ($scope, elm) {             // varables being defined ...              _.extend($scope, {                 // variables being defined ...              getdata: function() {                 // trying places , ids.                    // places has values in it, not ids.              }         }     } }) 
<!-- 'ids' has values in here. --> <div ng-show="currentpage == 'name'">   <directive-name ids="ids" places="places"></directive-name> </div> 


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -