UNPKG

ng-browse

Version:

unified browse service for angularjs projects

1 lines 543 B
angular.module("ngBrowse",["ui.router"]).service("$ngBrowse",["$location","$window","$state","$stateParams",function(t,n,o,i){"use strict";this.back=function(t){t=t||-1,n.history.go(t)},this.navigate=function(n,o){o?t.path(n).replace():t.path(n)},this.go=function(t,n,i){o.go(t,n,{location:i?"replace":!0})},this.current=function(){return o.current},this.params=function(){return o.params},this.location=function(){return t.path()},this.reload=function(t){t?n.location.reload():o.transitionTo(o.current,i,{reload:!0,inherit:!1,notify:!0})}}]);