| 1234567891011121314151617181920 |
- const app = require('../app')
- app.component('appUserArea', {
- transclude: true,
- bindings: {
- titleText: '@'
- },
- template: html`<div ng-transclude></div>`,
- controller: function($scope, $rootScope) {
- $rootScope.inUserArea = ($rootScope.inUserArea || 0) + 1
- $rootScope.userArea = this
- $scope.$on('$destroy', () => {
- setTimeout(() => {
- $rootScope.inUserArea--
- if ($rootScope.userArea === this) {
- $rootScope.userArea = null
- }
- })
- })
- }
- })
|