Skip to content Skip to sidebar Skip to footer

Angularjs Stopping Css Background Slideshow Showing All Pages With Ng-route

I am doing my AngularJS project with ng-route and everything works fine but the problem is I have a CSSC full background slide show which i implemented form this site http://tympan

Solution 1:

You need to move your slideshow directive into the context of the index instead of the context of the entire application. Something like this:

app.config(function($routeProvider) {
    $routeProvider
    .when('/', {
        template:'<div main-slide-show></div>'
    })
    .when('/overview', {
        templateUrl : 'overview.html',
        controller : 'whaleController'
    })
     .when('/map', {
        templateUrl : 'map.html',
        controller : 'MapController',
    })

    .otherwise({
        redirectTo : '/'
    });
});

And pull the slideshow directive out of the markup.

Post a Comment for "Angularjs Stopping Css Background Slideshow Showing All Pages With Ng-route"