$dragProgress is undefined
See original GitHub issueHello,
I have an issue with subscribing to .dragProgress$. It returns undefined.
I am using 3.0.0-beta.9 because I had an issue with embeding in material tabs not taking ‘size’ property.
My code is :
@ViewChildren("graphSplit") graphSplit: SplitComponent;
ngAfterViewInit(): void {
console.log("This is called");
console.log(this.graphSplit); // NOT NULL
console.log(this.graphSplit.dragProgress$); // NULL
this.graphSplit.dragProgress$.subscribe(() => {
console.log("hi");
});
}
I have tried what you said here : https://stackblitz.com/edit/angular-duzjbv?file=src%2Fapp%2Fapp.component.ts
But it stills says undefined. Here’s the stack :
ERROR TypeError: this.graphSplit.dragProgress$ is undefined
Stack trace:
./src/app/programs-zone/programs-zone.component.ts/ProgramsZoneComponent.prototype.ngAfterViewInit@http://localhost:4200/main.js:3170:9
callProviderLifecycles@http://localhost:4200/vendor.js:64089:9
callElementProvidersLifecycles@http://localhost:4200/vendor.js:64063:13
callLifecycleHooksChildrenFirst@http://localhost:4200/vendor.js:64053:29
checkAndUpdateView@http://localhost:4200/vendor.js:64989:5
callViewAction@http://localhost:4200/vendor.js:65221:21
execComponentViewsAction@http://localhost:4200/vendor.js:65163:13
checkAndUpdateView@http://localhost:4200/vendor.js:64986:5
callWithDebugContext@http://localhost:4200/vendor.js:65873:22
debugCheckAndUpdateView@http://localhost:4200/vendor.js:65551:12
./node_modules/@angular/core/fesm5/core.js/ViewRef_.prototype.detectChanges@http://localhost:4200/vendor.js:63367:13
./node_modules/@angular/core/fesm5/core.js/ApplicationRef.prototype.tick/<@http://localhost:4200/vendor.js:59100:58
./node_modules/@angular/core/fesm5/core.js/ApplicationRef.prototype.tick@http://localhost:4200/vendor.js:59100:13
./node_modules/@angular/core/fesm5/core.js/ApplicationRef.prototype._loadComponent@http://localhost:4200/vendor.js:59134:9
./node_modules/@angular/core/fesm5/core.js/ApplicationRef.prototype.bootstrap@http://localhost:4200/vendor.js:59076:9
./node_modules/@angular/core/fesm5/core.js/PlatformRef.prototype._moduleDoBootstrap/<@http://localhost:4200/vendor.js:58879:74
./node_modules/@angular/core/fesm5/core.js/PlatformRef.prototype._moduleDoBootstrap@http://localhost:4200/vendor.js:58879:13
./node_modules/@angular/core/fesm5/core.js/PlatformRef.prototype.bootstrapModuleFactory/</</<@http://localhost:4200/vendor.js:58845:21
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke@http://localhost:4200/polyfills.js:8521:17
onInvoke@http://localhost:4200/vendor.js:58349:24
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke@http://localhost:4200/polyfills.js:8520:37
./node_modules/zone.js/dist/zone.js/</Zone.prototype.run@http://localhost:4200/polyfills.js:8280:24
scheduleResolveOrReject/<@http://localhost:4200/polyfills.js:9019:29
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invokeTask@http://localhost:4200/polyfills.js:8553:17
onInvokeTask@http://localhost:4200/vendor.js:58340:24
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invokeTask@http://localhost:4200/polyfills.js:8552:41
./node_modules/zone.js/dist/zone.js/</Zone.prototype.runTask@http://localhost:4200/polyfills.js:8325:28
drainMicroTaskQueue@http://localhost:4200/polyfills.js:8731:25
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke@http://localhost:4200/polyfills.js:8521:17
onInvoke@http://localhost:4200/vendor.js:58349:24
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke@http://localhost:4200/polyfills.js:8520:37
./node_modules/zone.js/dist/zone.js/</Zone.prototype.run@http://localhost:4200/polyfills.js:8280:24
./node_modules/zone.js/dist/zone.js/</</</<@http://localhost:4200/polyfills.js:11252:24
patchMethod/proto[name]@http://localhost:4200/polyfills.js:9699:24
load@http://localhost:4200/main.js:2358:25
./node_modules/highcharts/highcharts.js/</</a.fireEvent/<@http://localhost:4200/vendor.js:123352:268
./node_modules/highcharts/highcharts.js/</</a.fireEvent@http://localhost:4200/vendor.js:123352:68
onload@http://localhost:4200/vendor.js:123608:50
firstRender@http://localhost:4200/vendor.js:123607:457
init/<@http://localhost:4200/vendor.js:123581:369
./node_modules/highcharts/highcharts.js/</</a.fireEvent@http://localhost:4200/vendor.js:123352:326
init@http://localhost:4200/vendor.js:123580:131
getArgs@http://localhost:4200/vendor.js:123580:51
./node_modules/highcharts/highcharts.js/</</a.Chart@http://localhost:4200/vendor.js:123579:347
./node_modules/highcharts/highcharts.js/</</a.chart@http://localhost:4200/vendor.js:123579:414
./node_modules/highcharts-angular/fesm5/highcharts-angular.js/HighchartsChartComponent.prototype.updateOrCreateChart@http://localhost:4200/vendor.js:123236:45
./node_modules/highcharts-angular/fesm5/highcharts-angular.js/HighchartsChartComponent.prototype.wrappedUpdateOrCreateChart@http://localhost:4200/vendor.js:123222:13
set@http://localhost:4200/vendor.js:123188:13
updateProp@http://localhost:4200/vendor.js:63978:5
checkAndUpdateDirectiveInline@http://localhost:4200/vendor.js:63737:19
checkAndUpdateNodeInline@http://localhost:4200/vendor.js:65036:20
checkAndUpdateNode@http://localhost:4200/vendor.js:64998:16
debugCheckAndUpdateNode@http://localhost:4200/vendor.js:65631:19
debugCheckDirectivesFn@http://localhost:4200/vendor.js:65591:13
View_GraphZoneComponent_0/<@ng:///AppModule/GraphZoneComponent.ngfactory.js:17:5
debugUpdateDirectives@http://localhost:4200/vendor.js:65583:12
checkAndUpdateView@http://localhost:4200/vendor.js:64980:5
callViewAction@http://localhost:4200/vendor.js:65221:21
execComponentViewsAction@http://localhost:4200/vendor.js:65163:13
checkAndUpdateView@http://localhost:4200/vendor.js:64986:5
callViewAction@http://localhost:4200/vendor.js:65221:21
execEmbeddedViewsAction@http://localhost:4200/vendor.js:65184:17
checkAndUpdateView@http://localhost:4200/vendor.js:64981:5
callViewAction@http://localhost:4200/vendor.js:65221:21
execComponentViewsAction@http://localhost:4200/vendor.js:65163:13
checkAndUpdateView@http://localhost:4200/vendor.js:64986:5
callViewAction@http://localhost:4200/vendor.js:65221:21
execComponentViewsAction@http://localhost:4200/vendor.js:65163:13
checkAndUpdateView@http://localhost:4200/vendor.js:64986:5
callWithDebugContext@http://localhost:4200/vendor.js:65873:22
debugCheckAndUpdateView@http://localhost:4200/vendor.js:65551:12
./node_modules/@angular/core/fesm5/core.js/ViewRef_.prototype.detectChanges@http://localhost:4200/vendor.js:63367:13
./node_modules/@angular/core/fesm5/core.js/ApplicationRef.prototype.tick/<@http://localhost:4200/vendor.js:59100:58
./node_modules/@angular/core/fesm5/core.js/ApplicationRef.prototype.tick@http://localhost:4200/vendor.js:59100:13
next/<@http://localhost:4200/vendor.js:58991:99
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke@http://localhost:4200/polyfills.js:8521:17
onInvoke@http://localhost:4200/vendor.js:58349:24
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke@http://localhost:4200/polyfills.js:8520:37
./node_modules/zone.js/dist/zone.js/</Zone.prototype.run@http://localhost:4200/polyfills.js:8280:24
./node_modules/@angular/core/fesm5/core.js/NgZone.prototype.run@http://localhost:4200/vendor.js:58263:16
next@http://localhost:4200/vendor.js:58991:69
./node_modules/@angular/core/fesm5/core.js/EventEmitter.prototype.subscribe/schedulerFn<@http://localhost:4200/vendor.js:58080:36
./node_modules/rxjs/_esm5/internal/Subscriber.js/SafeSubscriber.prototype.__tryOrUnsub@http://localhost:4200/vendor.js:126156:13
./node_modules/rxjs/_esm5/internal/Subscriber.js/SafeSubscriber.prototype.next@http://localhost:4200/vendor.js:126094:17
./node_modules/rxjs/_esm5/internal/Subscriber.js/Subscriber.prototype._next@http://localhost:4200/vendor.js:126038:9
./node_modules/rxjs/_esm5/internal/Subscriber.js/Subscriber.prototype.next@http://localhost:4200/vendor.js:126015:13
./node_modules/rxjs/_esm5/internal/Subject.js/Subject.prototype.next@http://localhost:4200/vendor.js:125781:17
./node_modules/@angular/core/fesm5/core.js/EventEmitter.prototype.emit@http://localhost:4200/vendor.js:58064:54
checkStable@http://localhost:4200/vendor.js:58318:13
onLeave@http://localhost:4200/vendor.js:58385:5
onInvokeTask@http://localhost:4200/vendor.js:58343:17
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invokeTask@http://localhost:4200/polyfills.js:8552:41
./node_modules/zone.js/dist/zone.js/</Zone.prototype.runTask@http://localhost:4200/polyfills.js:8325:28
./node_modules/zone.js/dist/zone.js/</ZoneTask.invokeTask@http://localhost:4200/polyfills.js:8628:24
invokeTask@http://localhost:4200/polyfills.js:9874:9
globalZoneAwareCallback@http://localhost:4200/polyfills.js:9911:21
AppComponent.html:5:4
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
$dragProgress is undefined · Issue #159 · angular-split ...
Hello, I have an issue with subscribing to .dragProgress$. It returns undefined. I am using 3.0.0-beta.9 because I had an issue with ...
Read more >Angular Split Issue159 - StackBlitz
dragProgress $ === undefined); // it is. undefined. // Error: Cannot read property. 'subscribe' of undefined. this.splitComponent.dragProgress$.
Read more >https://raw.githubusercontent.com/bertrandg/angula...
Doing this you can track drag progress without triggering change detection inside component containing `<as-split>`, see "Sync example demo" opening ...
Read more >Drag Progress and Tap Background - Design+Code
Use the drag values and use them as a progress to animate views in SwiftUI.
Read more >Ubuntu.Components BottomEdge
Undefined, Default. The drag is not performed or the direction is not detected. ; Upwards, The drag is performed from bottom up or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

oops, sorry I’m new to Angular. Thanks for your help.
keep up the good work 😃
Hi, You use
ViewChildren(which return an array) instead ofViewChildwhich only returns one instance! 😉