angular-intro.js icon indicating copy to clipboard operation
angular-intro.js copied to clipboard

Expression 'undefined' used with directive 'ngIntroOptions' is non-assignable!

Open brunowego opened this issue 10 years ago • 6 comments

This issue is referred in #50 but without any idea how solve this. Any idea how solve it? :weary:

angular.js:10126 Error: [$compile:nonassign] Expression 'undefined' used with directive 'ngIntroOptions' is non-assignable!
http://errors.angularjs.org/1.2.28/$compile/nonassign?p0=undefined&p1=ngIntroOptions
    at angular.js:78
    at parentSet (angular.js:6660)
    at Object.parentValueWatch (angular.js:6674)
    at Scope.$digest (angular.js:12642)
    at Scope.$apply (angular.js:12915)
    at angular.js:1447
    at Object.invoke (angular.js:3965)
    at doBootstrap (angular.js:1445)
    at bootstrap (angular.js:1459)
    at angularInit (angular.js:1368)(anonymous function) @ angular.js:10126(anonymous function) @ angular.js:7398Scope.$digest @ angular.js:12669Scope.$apply @ angular.js:12915(anonymous function) @ angular.js:1447invoke @ angular.js:3965doBootstrap @ angular.js:1445bootstrap @ angular.js:1459angularInit @ angular.js:1368(anonymous function) @ angular.js:22149fire @ jquery.js:3099self.fireWith @ jquery.js:3211jQuery.extend.ready @ jquery.js:3417completed @ jquery.js:3433
angular.js:10126 TypeError: scope.ngIntroMethod is not a function
    at angular-intro.js:119
    at angular.js:14417
    at completeOutstandingRequest (angular.js:4411)
    at angular.js:4725(anonymous function) @ angular.js:10126(anonymous function) @ angular.js:7398(anonymous function) @ angular.js:14420completeOutstandingRequest @ angular.js:4411(anonymous function) @ angular.js:4725

Details

jQuery v2.1.1 Angular v1.2.28 Angular Intro.js v1.2.x/.1.3.x (both with same issue)

Thanks! :alien:

brunowego avatar Nov 04 '15 18:11 brunowego

I not using directives in the same element of controller.

brunowego avatar Nov 04 '15 18:11 brunowego

Hey, I had the same problem too. I managed to reproduce this with the example plunkr. I had to include the ng-intro-method attribute like so:

<div class="content" ng-intro-options="introOptions" ng-intro-autostart="true" ng-intro-method="CallMe" ng-intro-autorefresh="true">

My guess is that it might be something to do with scopes, because later on in angular-intro.js, when autoStartWatch got called, scope.ngIntroMethod as well as the other methods were all undefined. I'll try to fix it later if I have time, but for now specifying ng-intro-method seems to work.

riyunoa avatar Dec 09 '15 00:12 riyunoa

Get issue again with angular 1.4.9

brunowego avatar Feb 03 '16 13:02 brunowego

@mendhak know how solve this issue? Thanks!

brunowego avatar Feb 15 '16 14:02 brunowego

This error is throw because the directive definition need =? for optional scope binding. A fix of an old regression introduce in 1.4 has been publish in 1.4.9 https://github.com/angular/angular.js/issues/13937

HugoPoi avatar Feb 19 '16 14:02 HugoPoi

I'm having the same issue with angular 1.5.11. Did someone know how to solve this issue?

enricop89 avatar Jul 11 '17 15:07 enricop89