E
E
eXe1en72016-01-31 13:17:42
Angular
eXe1en7, 2016-01-31 13:17:42

Bookmarks in angular, how to initialize bx-slider inside a bookmark?

There is an html file with bookmarks implemented through angular, you need to put your own slider inside each bookmark

<div class="partners-tabs" ng-controller="MainController">
                <ul class="tabs-navigation">
                    <li class="tab-item" ng-class="{'active-tab': routeInformation.current.activetab==='all'}">
                        <a class="tab-link" href="#All">All</a>
                    </li> 
                      .........................

Content of all.html
<div class="tab-content">
    <div class="slider-wrap">

        <div class="slider">
            <div class="slide">      
             /////
            </div>

            <div class="slide">
                /////
            </div>

            <div class="slide">
              /////
            </div>

           
        </div><!--slider-->
 </div>
</div>

I initialize the slider
$(document).on('ready', function () {
       $('.slider').bxSlider({
            slideWidth: 300,
            minSlides: 2,
            maxSlides: 3,
            moveSlides: 1,
            slideMargin: 10
        });
 });

html works anywhere, it doesn’t work in bookmarks
Well, here’s another one for every angular code
var module = angular.module('tabs', ['ngRoute']);

module.controller('MainController', ['$rootScope', '$scope', '$route', function($rootScope, $scope, $route) {
    $scope.routeInformation = $route;
}]);

module.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {

    $routeProvider

        .when('/all', {
            templateUrl: './templates/all.html',
            activetab: 'all'
        })
......

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question