johniejohnie
johniejohnie

Reputation: 523

Controller and Directive requesting isolated scope on the same element

I have a problem when trying adding ng-intro-options attribute on the element

The Code

var App = angular.module('MyApp', ['infinite-scroll', 'angular-intro']);
App.controller('MyController', ['$scope', function($scope){
    $scope.IntroOptions = {}
}]);

and the HTML

<body ng-controller="MyController" ng-intro-options="IntroOptions">

But AngularJS is throwing error mentioning the URL:

http://docs.angularjs.org/error/$compile/multidir

The error is thrown as soon as I add the attr for angular-intro on the body tag. I'm using angular 1.3.5

Upvotes: 2

Views: 163

Answers (1)

Pankaj Parkar
Pankaj Parkar

Reputation: 136164

The is issue with the latest version of angular, Which is not stable version.

That issue is even reproducible with angular 1.3.0

It is working as expected with https://code.angularjs.org/1.2.27/angular.js which is stable release.

angular 1.2.27 Fidlle working as expected.

angular 1.3.0 and above Fidlle giving some error like you are getting. Check console

Switch back to stable version will solve your issue.

Hopefully it will helpful to you.

Upvotes: 1

Related Questions