Numerous directives, such as [flexSlider, slide], are requesting transclusion

I'm currently utilizing the angular-flexslider plugin.

Here's my bower.json file configuration:

{
  "name": "...",
  "version": "1.0.0",
  "dependencies": {
    "angular": ">=1.2.*",
    "json3": "~3.3.1",
    "es5-shim": "~3.0.1",
    "jquery": "~1.11.0",
    "bootstrap": "~3.1.1",
    "angular-resource": ">=1.2.*",
    "angular-cookies": ">=1.2.*",
    "angular-sanitize": ">=1.2.*",
    "angular-bootstrap": "~0.11.0",
    "font-awesome": ">=4.1.0",
    "lodash": "~2.4.1",
    "angular-ui-router": "~0.2.10",
    "angular-google-maps": "~2.1.0",
    "angular-animate": "~1.3.15",
    "ng-table": "~0.5.4",
    "angular-touch": "~1.3.15",
    "angular-flexslider": "~1.3.2"
  },
  "devDependencies": {
    "angular-mocks": ">=1.2.*",
    "angular-scenario": ">=1.2.*"
  },
  "resolutions": {
    "angular": "1.3.15"
  }
}

I have included FlexSlider's CSS in my index.html:

<link rel="stylesheet" type="text/css" href="/components/flexslider/flexslider.css">

Next step is to include the necessary scripts (maintain order):

<script src="/components/jquery/jquery.js"></script>
<script src="/components/flexslider/jquery.flexslider.js"></script>
<script src="/components/angular/angular.js"></script>
<script src="/components/angular-flexslider/angular-flexslider.js"></script>

In my AngularJS application, I import the angular-flexslider module as follows:

'use strict';

angular.module('autoPrivilegeApp', [
  'ngCookies',
  'ngResource',
  'ngAnimate',
  'ngTable',
  'ngTouch',
  'ngSanitize',
  'ui.router',
  'ui.bootstrap',
  'uiGmapgoogle-maps','angular-flexslider'])
  .config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
    $urlRouterProvider
      .otherwise('/');
    window.angular
    $locationProvider.html5Mode(true);
  });

I've initialized some slides in my MainCtrl:

$scope.slides = [      
  'http://flexslider.woothemes.com/images/kitchen_adventurer_cheesecake_brownie.jpg',
  'http://flexslider.woothemes.com/images/kitchen_adventurer_lemon.jpg',
  'http://flexslider.woothemes.com/images/kitchen_adventurer_donut.jpg',
  'http://flexslider.woothemes.com/images/kitchen_adventurer_caramel.jpg'
];

The main.html contains the structure for displaying these slides:

<header class="hero-unit" id="banner">
  <div class="container">
    <div ng-controller="MainCtrl">
      <flex-slider slide="s in slides" animation="slide">
        <li>
          <img ng-src="{{s}}">
        </li>
      </flex-slider>
    </div>
  </div>
</header>

However, upon execution, an error occurs:

angular.js:11655 Error: [$compile:multidir] Multiple directives [flexSlider, slide] asking for transclusion on: http://errors.angularjs.org/1.3.15/$compile/multidir?p0=flexSlider&p1=slide&p2=transclusion&p3=%3Cdivlass%3D%flexslider-container%22%20slide%3D%s%in%slides%22%20animation%3D%slide%22%3E at REGEX_STRING_REGEXP (http://localhost:9000/bower_components/angular/angular.js:63:12) at assertNoDuplicate (http://localhost:9000/bower_components/angular/angular.js:8035:15) at applyDirectivesToNode (http://localhost:9000/bower_components/angular/angular.js:7397:13) at compileNodes (http://localhost:9000/bower_components/angular/angular.js:7039:15) at compileNodes (http://localhost:9000/bower_components/angular/angular.js:7051:15) at compileNodes (http://localhost:9000/bower_components/angular/angular.js:7051:15) at compileNodes (http://localhost:9000/bower_components/angular/angular.js:7051:15) at compile (http://localhost:9000/bower_components/angular/angular.js:6946:15) at compile (http://localhost:9000/bower_components/angular-ui-router/release/angular-ui-router.js:4013:20) at invokeLinkFn (http://localhost:9000/bower_components/angular/angular.js:8258:9)(anonymous function) @ angular.js:11655$get @ angular.js:8596invokeLinkFn @ angular.js:8260nodeLinkFn @ angular.js:7768compositeLinkFn @ angular.js:7117publicLinkFn @ angular.js:6996updateView @ angular-ui-router.js:3959(anonymous function) @ angular-ui-router.js:3921$get.Scope.$broadcast @ angular.js:14785$state.transitionTo.$state.transition.resolved.then.$state.transition @ angular-ui-router.js:3311processQueue @ angular.js:13248(anonymous function) @ angular.js:13264$get.Scope.$eval @ angular.js:14466$get.Scope.$digest @ angular.js:14282$get.Scope.$apply @ angular.js:14571done @ angular.js:9698completeRequest @ angular.js:9888requestLoaded @ angular.js:9829

Answer №1

UI Bootstrap's carousel widget clashes with flex-slider.

If you examine the code of angular-flexslider (available here), specifically on line 12, it looks for attributes named slide or flexSlide.

To resolve this conflict, simply change your attributes from slide to flex-slide.

Additionally, here is an edit with the necessary code:

<header class="hero-unit" id="banner">
  <div class="container">
    <div ng-controller="MainCtrl">
      <flex-slider flex-slide="s in slides" animation="slide">
        <li>
          <img ng-src="{{s}}">
        </li>
      </flex-slider>
    </div>
  </div>
</header> 

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Ways to pass PHP variable to Javascript

I need a more efficient method to pass my PHP variable to Javascript. Currently, I use the following code to echo the variable in PHP: <script> var numbers = <?php echo $numbers ?>; </script> Afterward, I access this variable in Javasc ...

The checkbox within the modal popup is failing to trigger the mousedown event on the external popup button

In the world of Drupal, there exists a unique phenomenon known as the modal popup - essentially a dialog box that appears within an iframe. One user found themselves faced with the challenge of triggering a mousedown event on a submit button located outsid ...

How about implementing built-in validation for Vue Headless UI Listbox (Select) element?

I need assistance in integrating native validation support into the Vue3 or Nuxt 3 Vue Headless UI Listbox (Select) component. It appears that direct support is not available, so I am looking for the best and most straightforward approach to achieve this. ...

Transmitting messages to socket.io rooms using node.js

As I embark on building my first app in node.js - a chat application, I have encountered an issue with sending messages to the correct room. It seems that socket.room isn’t being stored, possibly due to my approach of refreshing the page for loading view ...

Is it possible to apply an object method for filtering an ng-repeat?

I'm still getting the hang of angular and JavaScript OOP, looking to create a reusable component in Angular that can bind all controls to an instance of a JavaScript object. One strange issue I came across is when attempting to filter a collection usi ...

Tips for successfully transferring values or parameters within the Bootstrap modal

How can I create a cancel button that triggers a modal asking "Are you sure you want to cancel the task?" and calls a function to make an API call when the user clicks "Ok"? The challenge is each user has a unique ID that needs to be passed to the API for ...

How to add page breaks with spacing and page numbers in HTML to PDF conversion?

Seeking assistance regarding adding spacing between page breaks within an HTML table to accommodate a page number at the bottom of each page. Below, I have depicted my current setup and what I aim to achieve. Is it feasible with the html2pdf library? http ...

Troubleshooting AngularJS: ng-disabled functionality not functioning as anticipated

How can I disable the file input tag after a user has selected a file? HTML: <div ng-controller='firstController'> <div ng-controller='secondController'> <input type="file" name="file" upload class="theFileInp ...

"Integrating a controller into a modal view: a step-by

After spending an unhealthy amount of time on this issue, I finally managed to resolve it. Initially, the modal.open function was only darkening the screen without displaying any dialog box. However, by using windowTemplateUrl to override templateUrl, I wa ...

Bring to the front the div altered by a CSS3 animation

Recently, I encountered an issue with a div card that triggers an animation when clicked. The animation involves the card scaling up larger, but the problem arises as its edges get hidden under other cards. To visualize this, take a look at the screenshot ...

Encountering an unexpected token error while attempting to incorporate JQuery into a React JS project

I am currently diving into the world of React.js and attempting to incorporate a side navigation bar on my homepage. However, I encountered an eslint error when trying to implement the sidebar using jQuery code. Below you will find the code snippet for the ...

Steps to store radio button selections in local storage

I have a quiz that includes radio buttons, and I need to save the answers on my local storage. However, I am currently stuck and unsure of what else to do. I am learning, so please don't be too hard on me. Thank you! Here is the code I have written s ...

Struggling with integrating Bootstrap 4 Modals in Angular 2 environment

I attempted to incorporate a modal from into my navbar, but nothing happens when I click on it. <div class="pos-f-t fixed-top header"> <nav class="navbar navbar-inverse bg-inverse navbar-toggleable-md"> <button class="navbar- ...

Discover a personalized message and alter its hue using JavaScript and CSS styling

I've hit a roadblock while creating my website with WordPress and a custom theme. Although I can easily inject custom Js or CSS, I need advice on how to achieve the following: How can I locate the symbol ★ within the content and change its color? ...

Guide to sending client-to-client notifications in Angular/Ionic with Firebase Cloud Messaging

I am looking to implement client-client push notifications (not server-to-client). My goal is to send a notification when one user messages another. Is this feasible? How can I achieve this using the structure in the Firebase real-time database? Here is a ...

Is a switch statement supported by jade's syntax?

When attempting to implement a switch statement in Jade served by Express, I encountered an error message stating "unexpected identifier". - switch(myvar) - case: "0" span First Case break - case: "2" span Second Case ...

The video is not displaying on the webpage when connected locally, but it appears when the source is a URL

Recently, while practicing some basic tasks on a cloud IDE called Goorm, I encountered an issue with displaying a video on a simple webpage. The EJS file and the video were located in the same folder, but when I set the src attribute of the video tag to "m ...

Guidelines on integrating Admob into Ionic framework

I tried following the steps outlined in this post: AdMob not loading ads in ionic/angular app After running the app using "ionic build ios && ionic emulate ios," I still see no ads, no black bar, nothing at all. Can someone help me figure out wha ...

Is it feasible for Javascript to trigger a callback or signal with Selenium?

Imagine using Selenium on a web page that utilizes an AJAX request to dynamically update content within a specific #content element. The #content element always has exactly five children, each without any classes, ids, or unique identifiers. Periodically, ...

What could be causing the express middleware function to break only under specific conditions when the 4th argument is included?

As a newcomer to node/express, I encountered a peculiar situation. When I add a 4th "value" parameter to certain middleware functions, they fail to work while others function properly. I have come across information suggesting that adding a 4th parameter c ...