I am building a SPA; I am at the point where I have incorporated Routes/Templates. It works mostly, however two plugins don't seem to work, I suspect are due to my integration?
#1 When the page loads initially my flexSlider slider works fine. But when I click back to the flexslider page, the slider doesn't fire again. I get no errors in the console.
This is the slider implementation:
$(window).load(function() {
$('.flexslider').flexslider({
pauseOnHover: true,
randomize: true,
animation: "slide"
});
});
This is my script for my angular file:
var rustyApp = angular.module('rustyApp', [
'ngRoute',
'viewController'
]);
rustyApp.config(['$routeProvider', function($routeProvider) {
$routeProvider
.when('/home', {
templateUrl: 'partials/home.html',
controller: 'HomeController'
})
.when('/work', {
templateUrl: 'partials/work.html',
controller: 'WorkController'
})
.when('/contact', {
templateUrl: 'partials/contact.html',
controller: 'ContactController'
})
.otherwise({
redirectTo: '/home'
})
}]);
var viewController = angular.module('viewController', []);
rustyApp.controller('HomeController', function($scope) {});
rustyApp.controller('WorkController', function($scope) {});
rustyApp.controller('ContactController', function($scope) {});
#2 I am using a off-canvas navigation for mobile. When I click a link for an appropriate page, I get my different templates/views, but the side panel doesn't close.
<aside class="left-off-canvas-menu">
<ul class=" off-canvas-list">
<li class="uk-active"><a href="#home"><i class="uk-icon-home"></i>home</a></li>
<li><a href="#work"><i class="uk-icon-photo"></i> work</a></li>
<li><a href="#contact"><i class="uk-icon-envelope-o"></i> contact</a></li>
</ul>
</aside>
#3
Right now as you can see its showing /#/home
shouldn't that be index.html/home
?
Thanks in advance