Yakov, That sample works fine in Chrome, In Edge get errors: Fatal error: Access is denied.
Evaluating https://unpkg.com/[email protected]/modules/_export.js Evaluating https://unpkg.com/[email protected]/modules/es6.reflect.apply.js Evaluating https://unpkg.com/[email protected]/es6/reflect.js Evaluating polyfills.ts Evaluating main.ts Loading app Will check in IE11 tomorrow. Thank you, Oleg. P.S.: my previous sample was giving TypeScript error that typescript object doesn't support this action, It did not show error code or which object/action. elementRef.nativeElement.dispatchEvent(new CustomEvent()). On Wed, Sep 6, 2017 at 9:05 AM, Yakov Fain <[email protected]> wrote: > Oleg, > > I don't have IE. Try this code sample in IE and see if it works there > https://stackblitz.com/edit/angular-56wcbh?file=app%2Fapp.component.html. > The event is dispatched from the nested DeepComponent and bubbles up to the > app component. > > Regards > Yakov > > > On Tuesday, September 5, 2017 at 10:30:01 PM UTC-4, OlegKon wrote: >> >> >> Sander, >> >> Thank you for your post. >> Note: I have no plans using Angular Universal, so that is not a concern. >> >> I tried that elementRef.nativeElement.dispatchEvent(new CustomEvent()) >> approach, it easily worked for me in Chrome, and I was happy. >> >> However, today I tried it with IE11, and got TS error like this Object >> is not supported, >> I guess, it is ElementRef is not supported in IE11? >> Anyway, that is a showstopper for me (must support IE), >> so back to the drawing board... >> >> Will try your second approach. >> >> TIA, >> Oleg. >> >> >> >> On Wednesday, August 16, 2017 at 7:52:09 AM UTC-4, OlegKon wrote: >>> >>> Hi, >>> >>> >>> My Angular2 app has many components, each of them communicates to >>> backend to get data (error prone process), >>> >>> and then I need to show errors or warnings to the user in parent >>> container (say, main page). >>> >>> Since bubbling doesn't seem to be supported in ng2/4 (why not?), is >>> there easy way to pass info to parent container? >>> >>> >>> I have seen some people suggesting to use elementRef.nativeElement.paren >>> tElement, >>> >>> some elementRef.nativeElement.dispatchEvent(new CustomEvent()).... >>> >>> Any better choices? >>> >>> >>> Please advise. >>> >>> >>> TIA, >>> >>> Oleg >>> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "Angular and AngularJS discussion" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/angular/nY63ntXhWsg/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- Thank you, Oleg. -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
