From dc2c87a63684c5e25897285f5c7f441a94490599 Mon Sep 17 00:00:00 2001 From: A K Srivastava Date: Fri, 25 Mar 2016 21:31:29 +0530 Subject: [PATCH] Fixed Slider Issue on Home Page. --- index.html | 11 +++++++---- js/main.js | 46 +++++++++++++++++++++++++++++++++++++------ partials/home.html | 49 ++++++++++------------------------------------ 3 files changed, 57 insertions(+), 49 deletions(-) diff --git a/index.html b/index.html index 6fa7bdc..1af937e 100755 --- a/index.html +++ b/index.html @@ -37,12 +37,15 @@
- - + - - + + + + + diff --git a/js/main.js b/js/main.js index de58014..cebf130 100755 --- a/js/main.js +++ b/js/main.js @@ -7,7 +7,7 @@ * Main AngularJS Web Application */ var app = angular.module('tutorialWebApp', [ - 'ngRoute' + 'ngRoute','ngAnimate', 'ui.bootstrap' ]); /** @@ -30,6 +30,31 @@ app.config(['$routeProvider', function ($routeProvider) { .otherwise("/404", {templateUrl: "partials/404.html", controller: "PageCtrl"}); }]); +/*use template cache to override carousel functionality - prev & next arrow glyphicon replaced by font-awesome icons.*/ +app.run(function($templateCache) { + $templateCache.put("uib/template/carousel/carousel.html", + "
\n" + + "
\n" + + " 1\">\n" + + " \n" + + " previous\n" + + " \n" + + " 1\">\n" + + " \n" + + " next\n" + + " \n" + + "
    1\">\n" + + "
  1. \n" + + " slide {{ $index + 1 }} of {{ slides.length }}, currently active\n" + + "
  2. \n" + + "
\n" + + "
\n" + + ""); + $templateCache.put("uib/template/carousel/slide.html", + "
\n" + + ""); +}); + /** * Controls the Blog */ @@ -40,16 +65,25 @@ app.controller('BlogCtrl', function (/* $scope, $location, $http */) { /** * Controls all other Pages */ -app.controller('PageCtrl', function (/* $scope, $location, $http */) { +app.controller('PageCtrl', function ( $scope, $location, $http ) { console.log("Page Controller reporting for duty."); + $scope.slideInterval = 3000; + $scope.noWrapSlides = false; + $scope.active = 0; + var slides = $scope.slides = [ + {image: 'http://placehold.it/1900x455&text=Slide One', text: 'Caption 1', id: 0 }, + {image: 'http://placehold.it/1900x455&text=Slide Two', text: 'Caption 2', id: 1 }, + {image: 'http://placehold.it/1900x455&text=Slide Three', text: 'Caption 3', id: 2 } + ]; + var currentIndex = 1; // Activates the Carousel - $('.carousel').carousel({ + /*$('.carousel').carousel({ interval: 5000 - }); + });*/ // Activates Tooltips for Social Links - $('.tooltip-social').tooltip({ + /*$('.tooltip-social').tooltip({ selector: "a[data-toggle=tooltip]" - }) + })*/ }); \ No newline at end of file diff --git a/partials/home.html b/partials/home.html index 9d3f8bd..c39b327 100755 --- a/partials/home.html +++ b/partials/home.html @@ -1,42 +1,13 @@ - - +
+ + + + + + +