viewModel inheritance from a baseViewModel?

3 posts, 1 answers
  1. Darryl
    Darryl avatar
    23 posts
    Member since:
    May 2005

    Posted 20 May 2013 Link to this post

    I have a bunch of pages that share a navigation template and common viewModel navigation properties that can be bound to a particular entity ID being passed between pages.

    Doesn't really matter if I haven't explained that too well but bottom line is the properties are pretty much identical for each viewModel apart from an ID tagged on the end of a URL string

    Along the lines of this post regarding Knockout ...

    http://stackoverflow.com/questions/16569810/knockout-viewmodel-base-class-javascript-inheritance

    is it possible to in the Kendo framework to implement a baseViewModel that other viewModels can inherit from?



  2. Darryl
    Darryl avatar
    23 posts
    Member since:
    May 2005

    Posted 21 May 2013 Link to this post

    Here's an example using Knockout showing what I'd like to do using Kendo ...

    http://jsfiddle.net/stratdaz/Ht8GR/6/
  3. Answer
    Darryl
    Darryl avatar
    23 posts
    Member since:
    May 2005

    Posted 22 May 2013 Link to this post

    Alexander from Telerik has kindly answered my question with this ...

    Hi Darryl,

    In Kendo MVVM you can achieve inheritance through the extend method. I prepared a small example to demonstrate the approach. Please check it and let me know if you have any further questions:
    http://jsbin.com/imuyuh/2/edit
    Kind regards,
    Alexander Valchev
    the Telerik team

Back to Top