mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
fix(devtools): handle lifecycle hooks of only components & directives
This commit is contained in:
parent
b7c003f76a
commit
199745fd6c
2 changed files with 15 additions and 3 deletions
|
|
@ -1,7 +1,11 @@
|
|||
import { ElementPosition, LifecycleProfile } from 'protocol';
|
||||
import { componentMetadata, runOutsideAngular } from '../utils';
|
||||
import { IdentityTracker, IndexedNode } from './identity-tracker';
|
||||
import { getLViewFromDirectiveOrElementInstance, getDirectiveHostElement } from '../lview-transform';
|
||||
import {
|
||||
getLViewFromDirectiveOrElementInstance,
|
||||
getDirectiveHostElement,
|
||||
METADATA_PROPERTY_NAME,
|
||||
} from '../lview-transform';
|
||||
import { DEV_TOOLS_HIGHLIGHT_NODE_ID } from '../highlighter';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
|
|
@ -264,6 +268,14 @@ export class DirectiveForestObserver {
|
|||
if (typeof el === 'function') {
|
||||
const self = this;
|
||||
current[idx] = function (): any {
|
||||
// We currently don't want to notify the consumer
|
||||
// for execution of lifecycle hooks of services and pipes.
|
||||
// These two abstractions don't have `__ngContext__`, and
|
||||
// currently we won't be able to extract the required
|
||||
// metadata by the UI.
|
||||
if (!this[METADATA_PROPERTY_NAME]) {
|
||||
return;
|
||||
}
|
||||
const id = self._tracker.getDirectiveId(this);
|
||||
const lifecycleHookName = getLifeCycleName(this, el);
|
||||
const element = getDirectiveHostElement(this);
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
"short_name": "Angular DevTools Alpha",
|
||||
"name": "Angular Developer Tools Alpha",
|
||||
"description": "Extends the Developer Tools, adding tools for debugging and profiling Angular applications.",
|
||||
"version": "1.0.11",
|
||||
"version_name": "1.0.11",
|
||||
"version": "1.0.12",
|
||||
"version_name": "1.0.12",
|
||||
"minimum_chrome_version": "50",
|
||||
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
|
||||
"icons": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue