-
Notifications
You must be signed in to change notification settings - Fork 175
Multiple directives error #50
Comments
I wonder if this has to do with support for Angular 1.3? I see your example uses 1.2 and when I update it to 1.3 I get an error: Error: [$compile:multidir] http://errors.angularjs.org/1.3.14/$compile/multidir?p0=ngController&p1=ngIntroOptions&p2=new%2Fisolated%20scope&p3=%3Cdiv%20class%3D%22container-narrow%22%20ng-controller%3D%22MyController%22%20ng-intro-options%3D%22IntroOptions%22%20ng-intro-method%3D%22CallMe%22%20ng-intro-oncomplete%3D%22CompletedEvent%22%20ng-intro-onexit%3D%22ExitEvent%22%20ng-intro-onchange%3D%22ChangeEvent%22%20ng-intro-onbeforechange%3D%22BeforeChangeEvent%22%20ng-intro-onafterchange%3D%22AfterChangeEvent%22%20ng-intro-autostart%3D%22ShouldAutoStart()%22%3E file:///Users/yaronguez/Websites/crypteron/angular-intro.js/bower_components/angular/angular.min.js |
Yes I think it has to do with changes in 1.3, see this page. Unfortunately it isn't immediately clear to me what the correct way of isolate scopes is. I'll have a look when I get some time (or a kind soul will create a pull request), but until then it's limited to 1.2 |
This problem is in fact an issue when the controller and directive exist on the same HTML element. The simple fix is to move the intro attribute(s) to another element. From my extremely limited understanding, Angular 1.3 doesn't know what to process first if they exist on the same element. It took the liberty of making a change see here: |
@gmkeith I've used your version and now I'm getting Error: [$compile:nonassign] Expression 'undefined' used with directive 'ngIntroOptions' is non-assignable! |
@solenoo How are you building and running? |
Hi guys, I just wanted to check back in on this. Were you all able to get this working with Angular 1.3? I've been using ng-joyride and running into all kinds of issues. I have yet to find a stable and robust onboarding plugin for Angular 1.3. |
I am facing the same issue when using this with Ionic code.
|
Following gmkelth's suggestion solved the issue for me. |
Hi, I'm using angular intro with the angular 1.3.15 and I didn't have troubles yet. So I think it's compatible both angular 1.2 and angular 1.3 |
With angular 1.3.15, this solved the $compile:multidir error for me:
|
#63 should fix your issue |
I get this issue again with 1.4.9 version of angular. |
Confirmed with 1.5.0 - the fix is #50 (comment) separate your ng-controller and ng-intro* attrs into different elements |
Same issue if creating a custom directive to use together with |
on the latest version 3.1.1 #112 it's possible to use the service directly, you may take advantage of using the controller only to manipulate the introJs. i'll close this, but if you need further help tell me, i'll try to help you asap. |
Hi there, I've copied your example directives and scope methods and get the following console error on page load:
Error: [$compile:multidir] Multiple directives [ngController, ngIntroOptions] asking for new/isolated scope on: http://errors.angularjs.org/1.3.5/$compile/multidir?p0=ngController&p1=ngIntroOptions&p2=new%2Fisolated%20scope&p3=%3Chtml%20ng-app%3D%22crypteron%22%20ng-controller%3D%22AppCtrl%22%20ng-intro-options%3D%22introOptions%22%20ng-intro-method%3D%22CallMe%22%20ng-intro-oncomplete%3D%22CompletedEvent%22%20ng-intro-onexit%3D%22ExitEvent%22%20ng-intro-onchange%3D%22ChangeEvent%22%20ng-intro-onbeforechange%3D%22BeforeChangeEvent%22%20ng-intro-onafterchange%3D%22AfterChangeEvent%22%20ng-intro-autostart%3D%22ShouldAutoStart()%22%3E minErr/<@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:63:12 assertNoDuplicate@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:7921:1 applyDirectivesToNode@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:7251:1 compileNodes@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:6931:15 compile@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:6838:15 bootstrapApply/<@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:1439:11 $RootScopeProvider/this.$get</Scope.prototype.$eval@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:14291:16 $RootScopeProvider/this.$get</Scope.prototype.$apply@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:14389:18 bootstrapApply@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:1437:9 invoke@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:4138:14 bootstrap/doBootstrap@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:1435:1 bootstrap@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:1455:1 angularInit@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:1349:5 @http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:25912:5 trigger@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:2722:7 createEventHandler/eventHandler@http://my.crypteron.dev:86/vendor/angular/angular.js?v=201412042317:2992:9
What am I doing wrong? Thanks!
Yaron
The text was updated successfully, but these errors were encountered: