Skip to content

Instantly share code, notes, and snippets.

@linxlad
Created October 18, 2015 23:30
Show Gist options
  • Save linxlad/b8497dbaa39e024387cf to your computer and use it in GitHub Desktop.
Save linxlad/b8497dbaa39e024387cf to your computer and use it in GitHub Desktop.
Service model that is the setter and getter for the current page.
(function () {
'use strict';
angular
.module('app')
.factory('Navigation', Navigation);
Navigation.$inject = [];
/**
* Navigation service model.
* @author Nathan Daly
* @ngdoc Service
*/
function Navigation() {
var _page = {};
return {
getPage: function () {
return _page;
},
setPage: function (page) {
_page = page;
}
};
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment