controller/scope reference inside upload event

3 posts, 1 answers
  1. Shawn
    Shawn avatar
    5 posts
    Member since:
    Dec 2013

    Posted 16 Feb Link to this post

    I'm using TypeScript and the this object inside the upload event is the instance of the kendoupload, not the angular controller.

    To get at a value on the controller, I'm currently using this.$angular_scope.vm.datavariable but is this the best way to access controller variables within the upload event?

  2. Answer
    Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2156 posts

    Posted 18 Feb Link to this post

    Hello Shawn,

    You are correct. This is the approach to access a controller variable in the event handler. Are you experiencing any issues with it?

    Regards,
    Dimiter Madjarov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Shawn
    Shawn avatar
    5 posts
    Member since:
    Dec 2013

    Posted 18 Feb in reply to Dimiter Madjarov Link to this post

    It works.  Only minor issue is that Visual Studio flags $angular_scope as unknown because it is thinking this is the class.  I just created a dummy declaration $angular_scope: any; on the class to clear the warning.
Back to Top