Without digging into this, the first thing that is apparent is that if you are using minification, you need to use inline bracket notation:
Scroll down to "A note on Minification": http://docs.angularjs.org/tutorial/step_05 But I don't see anything being injected so probably not be the issue. I'm wondering if the $parent reference is being changed when minified and therefore the issue? If so you could pass the function in on the new scope with ampersand: scope: { show: '=', stopVideoPlay: '&' } On Monday, March 10, 2014 8:47:24 AM UTC-6, calvin crane wrote: > > I don't get why minification would give me the error and not prior. Anyway > here is the problematic code block a custom directive that is a modal box > based heavily on Adam Albrechts > > > http://adamalbrecht.com/2013/12/12/creating-a-simple-modal-dialog-directive-in-angular-js/ > > I added some logic that could be fed into this item as I needed to stop a > video playing in an iframe that would go into the modal box. > Otherwise on closing the popup you will still hear the video and expect > that closing the modal might also handle this for the user. > > I am asking if anyone can shed some light on the lexicon error given and > in the minified code its hard to isolate it but still its an angular error > not js ! > > problem part of directive (BUT ONLY AFTER MINIFICATION) > > ng-click='hideModal("stopvideo")' > ---------- > scope.hideModal = function(hv) { > if(hv){ > scope.$parent.stopVideoPlay(); > } > ---------- > full function below > > yoangularApp.directive('modalDialog', function() { > return { > restrict: 'E', > scope: { > show: '=' > }, > replace: true, > transclude: true, > link: function(scope, element, attrs) { > scope.dialogStyle = {}; > if (attrs.width){ > scope.dialogStyle.width = attrs.width; > } > if (attrs.height){ > scope.dialogStyle.height = attrs.height; > } > scope.hideModal = function(hv) { > if(hv){ > scope.$parent.stopVideoPlay(); > } > scope.show = false; > } > }, > templateUrl:'/views/modal.html' > }; > }); > -- 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.
