<repo_name>dkaruli/Profolio<file_sep>/public/js/app.js
var app = angular.module('myport',['ngRoute']);

app.config(function ($routeProvider, $locationProvider) {

	$routeProvider
		.when('/', {
         	   templateUrl: '../partials/pages/aboutme.html',
         	   controller: 'Home'
       	 })

        .when('/Projects', {
            templateUrl: '../partials/pages/files.html',
            controller: 'FilesController'
        })

        .when('/Contact', {
            templateUrl: '../partials/pages/contacts.html',
            controller: 'ContactController'
        });
        $locationProvider.html5Mode(true);
});

app.directive('navigationMenu', function () {
    return {
        restrict: 'E',
        templateUrl: '../partials/pages/navbar.html',
        controller: 'Nav'
    };
});

<file_sep>/public/js/Controller/Nav.js
app.controller('Nav', function ($scope,$location,$http,$window){
    // Must use a wrapper object, otherwise "activeItem" won't work
    $scope.states = {};
    $scope.states.activeItem = $location.path();
    $scope.items = [{
        id: '/',
        title: 'Home',
        address: "/"
    },
    {
        id: '/Projects',
        title: 'Projects',
        address: "/Projects"
    },
    {
        id: '/Contact',
        title: 'Contact Me',
        address: "/Contact"
    }];
    $scope.source = '/Resume.pdf';
    $scope.toggle = false;
/*
    $scope.download=function(){
    $http.get('resume.pdf', {responseType: "arraybuffer"}).success(function(data){       
    var arrayBufferView = new Uint8Array( data );
    var blob = new Blob( [ arrayBufferView ], { type: 'application/pdf'} );
    var urlCreator = window.URL || window.webkitURL;
    var imageUrl = urlCreator.createObjectURL( blob );
    var img = document.querySelector( "#resume" );
    img.src = imageUrl;
    SaveToDisk(imageUrl,'resume.pdf');
    //  window.URL.revokeObjectURL(imageUrl);
             // code to download image here
        }).error(function(err, status){})
    }
function SaveToDisk(fileURL, fileName) {
    // for non-IE
    if (!window.ActiveXObject) {
        var save = document.createElement('a');
        save.href = fileURL;
        save.target = '_blank';
        save.download = fileName || 'unknown';

        var event = document.createEvent('Event');
        event.initEvent('click', true, true);
        save.dispatchEvent(event);
        (window.URL || window.webkitURL).revokeObjectURL(save.href);
    }

    // for IE
    else if ( !! window.ActiveXObject && document.execCommand)     {
        var _window = window.open(fileURL, '_blank');
        _window.document.close();
        _window.document.execCommand('SaveAs', true, fileName || fileURL)
        _window.close();
    }
    }
    */
});
<file_sep>/public/partials/pages/files.html
<div class="container-fluid">
<div class="row">
  <div class="col-xs-6 col-md-3">
    <a href="#" class="thumbnail">
      <img class="img-responsive" src="penguin.png">
      <div class="caption">
        <h3>Character Device Driver</h3>
        <p>This is Character Device Driver written in C for the Linux Kernel</p>
        </div>
    </a>
    </div>
    <div class="col-xs-6 col-md-3">
    <a href="#" class="thumbnail">
      <img class="img-responsive" src="ImageShare.png">
      <div class="caption">
        <h3>ImageShare</h3>
        <p>iOS Mobile Application written in Swift for photo sharing plateform ImageShare</p>
        </div>
    </a>
    </div>
    <div class="col-xs-6 col-md-3">
   <a href="#" class="thumbnail">
      <img class="img-responsive" src="ImageShare.png">
      <div class="caption">
        <h3>ImageShare</h3>
        <p>Web Application written in AngularJS/HTML5/javascript for photo sharing plateform ImageShare</p>
        </div>
    </a>
    </div>
    <div class="col-xs-6 col-md-3">
    <a href="#" class="thumbnail">
      <img class="img-responsive" src="ImageShare.png">
      <div class="caption">
        <h3>ImageShare</h3>
        <p>Backend written in PHP using Laravel framework for photo sharing plateform ImageShare</p>
        </div>
    </a>
</div>
</div>
<div class="row">
  <div class="col-xs-6 col-md-3">
    <a href="#" class="thumbnail">
      <img class="img-responsive" src="peg.jpg">
      <div class="caption">
        <h3>GTA Application Website</h3>
        <p>Web Application written in PHP/HTML5/javascript/jQuery for Professors to evaluate new GTA applicants</p>
        </div>
    </a>
    </div>
    <div class="col-xs-6 col-md-3">
    <a href="#" class="thumbnail">
      <img class="img-responsive" src="pacman.png">
      <div class="caption">
        <h3>Pacman Simulation</h3>
        <p>AI simulation of Pacman using Iterative deepening depth-first search algorithm</p>
        </div>
    </a>
    </div>
    <div class="col-xs-6 col-md-3">
   <a href="#" class="thumbnail">
      <img class="img-responsive" src="Hill.png">
      <div class="caption">
        <h3>Hill cipher</h3>
        <p>Implementing the popular Hill cipher encryption using Java</p>
        </div>
    </a>
    </div>
  </div>
  </div>