get set propoties in angular

Solutions on MaxInterview for get set propoties in angular by the best coders in the world

showing results for - "get set propoties in angular"
Camilla
13 Oct 2018
1var Element = (function() {
2  function Element() {
3    this._class = null;
4  }
5  Object.defineProperty(Element.prototype, 'className', {
6    get: function() {
7      return this._class;
8    },
9    set: function(name) {
10      this._class = 'todd-' + name;
11    },
12    enumerable: true,
13    configurable: true,
14  });
15  return Element;
16})();
17