@ardimedia/angular-portal-azure 0.2.187 → 0.2.188

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/apn.js +10 -2
  2. package/package.json +1 -1
package/apn.js CHANGED
@@ -396,11 +396,19 @@ var angularportalazure;
396
396
  throw new Error('[angularportalazure.Blade] \'onCommandExcel\' is an abstract function. Define one in the derived class.');
397
397
  };
398
398
  //#endregion
399
+ //** Change title, as soon as watchExpression changes. watchExpression is either a variable ore an expresssion, e.g. [name1 + name2] */
399
400
  Blade.prototype.setTitle = function (watchExpression, func) {
400
401
  var _this = this;
401
402
  if (this.watcherTitle === undefined) {
402
- this.watcherTitle = this.$scope.$watch(watchExpression, function () { func(); });
403
- this.$scope.$on('$destroy', function () { _this.watcherTitle(); });
403
+ if (this.$scope !== null) {
404
+ // angular1
405
+ this.watcherTitle = this.$scope.$watch(watchExpression, function () { func(); });
406
+ this.$scope.$on('$destroy', function () { _this.watcherTitle(); });
407
+ }
408
+ else {
409
+ // angular2
410
+ console.log('[Blade.setTitle()] not supported for angular2. use [ngOnChanges] instead.');
411
+ }
404
412
  }
405
413
  };
406
414
  Blade.prototype.setBladeHeights = function () {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ardimedia/angular-portal-azure",
3
3
  "description": "Angular Portal Azure - GUI Framework.",
4
4
  "author": "Ardimedia Anstalt <info@ardimedia.com> (http://www.ardimedia.com)",
5
- "version": "0.2.187",
5
+ "version": "0.2.188",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {