Skip to content

Commit

Permalink
Merge pull request #2849 from camptocamp/rm_bracket
Browse files Browse the repository at this point in the history
Don't use bracket notation in gmf.AbstractController
  • Loading branch information
fredj committed Aug 29, 2017
2 parents b7f2ace + 4ef8d97 commit 91d5e29
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions contribs/gmf/src/controllers/abstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@ gmf.AbstractController = function(config, $scope, $injector) {
*/
this.$scope = $scope;

/**
* @type {string}
* @export
*/
this.lang;

/**
* Default language
* @type {string}
Expand Down Expand Up @@ -579,14 +585,14 @@ gmf.AbstractController.prototype.switchLanguage = function(lang) {
this.gettextCatalog.setCurrentLanguage(lang);
this.gettextCatalog.loadRemote(this.langUrls[lang]);
this.tmhDynamicLocale.set(lang);
this['lang'] = lang;
this.lang = lang;
};


/**
*/
gmf.AbstractController.prototype.initLanguage = function() {
this.$scope.$watch(() => this['lang'], (newValue) => {
this.$scope.$watch(() => this.lang, (newValue) => {
this.stateManager.updateState({
'lang': newValue
});
Expand Down

0 comments on commit 91d5e29

Please sign in to comment.