This is a migrated thread and some comments may be shown as answers.

Model for Drawer access in related views

3 Answers 33 Views
Drawer (Mobile)
This is a migrated thread and some comments may be shown as answers.
mike
Top achievements
Rank 1
mike asked on 27 Jan 2014, 02:27 AM
I'm in a situation where I need to be able to access the model I have bound to the Drawer accessable to all the views it relates too. I've tried the below. Thanks in advance.


//in the view like this
app.filterService.viewModel.structureId

//model for filter

(function (global) {
  
    var FilterModel,
app = global.app = global.app || {};

    FilterModel = kendo.data.ObservableObject.extend({

        structures: kendo.observable({ items: GetStructures()}),
        structureId: 49118,

        days: kendo.observable({
            items: [
                { id: 7, name: "Past 7 Days" },
                { id: 30, name: "Past 30 Days" },   
                { id: 60, name: "Past 60 Days" },
                { id: 90, name: "Past 90 Days" }]
        }),
        day: 7
    });
   
    app.filterService = { viewModel: new FilterModel() };
    console.log(app.filterService.viewModel.structureId);
}
)(window);



3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 28 Jan 2014, 08:31 AM
Hi Mike,

The code that you have provided looks OK and should be working as expected. Please provide us with a runnable jsFiddle/jsBin where this issue is reproduced, so we can investigate.

Thank you in advance for your cooperation.

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mike
Top achievements
Rank 1
answered on 28 Jan 2014, 01:28 PM
Another thing is I'm running this in Icenium, don't know if that makes a difference. 

I'm going to try a couple things today and If I can't get this to work I'll get a jsfiddle up.

Thanks,
0
Kiril Nikolov
Telerik team
answered on 30 Jan 2014, 09:17 AM
Hi Mike,

Icenium should not make much difference (it still ships a relatively older version of Kendo UI, but if you have updated it, then it should be fine).

So if the problem still persists, please extract a runnable sample, so we can take a look at.

Thank you in advance for your cooperation.

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Drawer (Mobile)
Asked by
mike
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
mike
Top achievements
Rank 1
Share this question
or