I placed a kendo-window
in my html.
according to the docs, the window object should be available on the scope.
now, I want to bind a listener to the window's activate
event from within a controller that is declared inside the window. i.e.:
markup:
<body ng-app="app">
<div kendo-window='potatoWindow'>
<div ng-controller='PotatoController'>
here
</div>
</div>
js:
var app = angular.module("app", ["ngRoute", "kendo.directives"]);
app.controller("PotatoController", function($scope){
$scope.potatoWindow.bind("activate",
function () {
console.log("potato");
});
});
... but the window object (potatoWindow
) is not found on the $scope
during the controller.
Qs:
- why is the window object not available? am i missing something?
- if there is no way to access the window object - is there a way to get the same results by other means?