Skip to content

Commit

Permalink
add possibility to globally disable dynamic update
Browse files Browse the repository at this point in the history
  • Loading branch information
sulphur authored Oct 18, 2019
1 parent 8dab181 commit 13f3f01
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ngMeta.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

//One-time configuration
var config = {
useTitleSuffix: false
useTitleSuffix: false,
disableUpdate: false
};

function Meta($rootScope, $injector) {
Expand Down Expand Up @@ -139,7 +140,7 @@
var readRouteMeta = function(meta) {
meta = meta || {};

if (meta.disableUpdate) {
if (meta.disableUpdate || config.disableUpdate) {
return false;
}

Expand Down Expand Up @@ -298,6 +299,11 @@
return this;
};

this.disableUpdate = function(bool) {
config.disableUpdate = !!bool;
return this;
}

/**
* @ngdoc method
* @name ngMetaProvider#mergeNestedStateData
Expand Down

0 comments on commit 13f3f01

Please sign in to comment.