Make Accordion with AngularJs and Bootstrap CSS


https://i.ytimg.com/vi/UOoygbC3t3g/hqdefault.jpg



How To Download Songs From Soundcloud http://www.everyday1ebook.info/2014/03/how-to-download-songs-from-soundcloud.html

Download code Bootstrap Collapse Accordion http://www.everyday1ebook.info/2014/03/make-accordion-with-angularjs-and-bootstrap-css.html

How To Share Photos On iCloud http://www.everyday1ebook.info/2014/03/how-to-share-photos-on-icloud.html

Original source

3 thoughts on “Make Accordion with AngularJs and Bootstrap CSS

  • November 16, 2017 at 12:24
    Permalink

    A quick heads up to any newbies that use this video, with angular 1.3+ you can no longer use global controller declaration on the global scope. You would need to register the controller using module.controller syntax. Using this code in app.js will solve the error you'll get:

    angular.module('myapp', ['ui.bootstrap']).controller('AccordionDemoCtrl', ['$scope', function AccordionDemoCtrl($scope){
    $scope.oneAtATime=true;
    $scope.groups = [
    {
    title:"Dynamic Group Header 1",
    content:"Dynamic Group Body 1"
    },
    {
    title:"Dynamic Group Header 2",
    content:"Dynamic Group Body 2"
    }
    ];

    $scope.dynamicitem = "Dynamic Item";
    $scope.items=['Item 1', 'Item 2', 'Item 3'];
    $scope.addItem = function() {
    var newItem = $scope.items.length + 1;
    $scope.items.push('Item ' + newItem);
    };
    }]);

Leave a Reply