Answer the question
In order to leave comments, you need to log in
Why did the slider stop working after adding ng-view?
Hello everyone
, I added angular, and specifically the ng-view directive and the slider stopped working.
that is, the slider is in a separate file.
What dances with a tambourine are needed to make everything work back?
home.html
<article class='col-md-10'>
<div class="slider">
<img src="img/slider1.jpg" class="img-responsive" alt="slider pic"/>
<img src="img/slider2.jpg" class="img-responsive" alt="slider pic"/>
<img src="img/slider3.jpg" class="img-responsive" alt="slider pic"/>
<img src="img/slider4.jpg" class="img-responsive" alt="slider pic"/>
<img src="img/slider5.jpg" class="img-responsive" alt="slider pic"/>
<img src="img/slider6.jpg" class="img-responsive" alt="slider pic"/>
</div>
</article>
angular.module('App', ['ngRoute','ngAnimate'])
.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider){
$routeProvider
.when('/bio', {
templateUrl : 'bio.html'
})
.when('/contact', {
templateUrl : 'contact.html'
})
.when('/home', {
//страница со слайдером
templateUrl : 'home.html'
})
.otherwise({
//страница со слайдером
redirectTo: '/home'
})
//$locationProvider.html5Mode(true);
}])
.controller('MainCtrl', ['$scope', function($scope) {
}]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question