2

I want to implement the application here,

http://plnkr.co/edit/tOow1cCjrGiXxpeT3EXZ?p=preview

Firstly, I use this application layout.html,

<script src="/Content/scripts/angular/angular.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular-animate.js"></script>
<script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.14.3.js"></script>

Secondly, My angular js module layout.html,

var appModule = angular.module("app", ["ui.router", "directives", "constants", "services", "oc.lazyLoad", "ngCookies", 'ngAnimate', 'ui.bootstrap', 'ngSanitize', 'mgcrea.ngStrap']);

I use HTML,

<div style="height: 305px">
<uib-carousel interval="myInterval" no-wrap="noWrapSlides">
    <uib-slide ng-repeat="slide in slides" active="slide.active">
        <img ng-src="{{slide.image}}" style="margin:auto;">
        <div class="carousel-caption">
            <h4>Slide {{$index}}</h4>
            <p>{{slide.text}}</p>
        </div>
    </uib-slide>
</uib-carousel>

<div class="row">
<div class="col-md-6">
    <button type="button" class="btn btn-info" ng-click="addSlide()">Add Slide</button>
    <div class="checkbox">
        <label>
            <input type="checkbox" ng-model="noWrapSlides">
            Disable Slide Looping
        </label>
    </div>
</div>
<div class="col-md-6">
    Interval, in milliseconds: <input type="number" class="form-control" ng-model="myInterval">
    <br />Enter a negative number or 0 to stop the interval.
</div>

Google Console Error Messages:

Error: [$compile:ctreq] http://errors.angularjs.org/1.3.14/$compile/ctreq?p0=carousel&p1=slide
at Error (native)
at http://localhost:17384/Content/scripts/angular/angular.min.js:6:417
at D (http://localhost:17384/Content/scripts/angular/angular.min.js:56:98)
at A (http://localhost:17384/Content/scripts/angular/angular.min.js:59:241)
at http://localhost:17384/Content/scripts/angular/angular.min.js:66:193
at http://localhost:17384/Content/scripts/angular/angular.min.js:112:20
at l.$get.l.$eval (http://localhost:17384/Content/scripts/angular/angular.min.js:125:305)
at l.$get.l.$digest (http://localhost:17384/Content/scripts/angular/angular.min.js:122:398)
at l.$get.l.$apply (http://localhost:17384/Content/scripts/angular/angular.min.js:126:58)
at http://localhost:17384/Content/scripts/angular/angular.min.js:138:243
5
  • Could you please update your plunkr? Commented Dec 11, 2015 at 20:24
  • 1
    Don't use the minified version of angular during development. Use it in production. You'll have much better error messages with the non-minified version. Your message indicates that you're using angular 1.3.14, and you're also using angular-animate 1.4.7. That can't work. Commented Dec 11, 2015 at 20:25
  • I updated link. And ı use angular min js 1.4.7 version in local. Commented Dec 11, 2015 at 20:29
  • 1
    The plunkr you've posted works fine. Commented Dec 11, 2015 at 20:32
  • Yes there is working fine but my application gives an error Commented Dec 11, 2015 at 20:33

1 Answer 1

0

This error occures mainly when a directive has some required things, and you missing one: https://docs.angularjs.org/error/$compile/ctreq

Carousel needs a controller, and the HTML above, I don't see if you already defined one. Maybe you missing the controller for the page?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.