1
我已經注意到其他kendo-ui控件的這個問題,但我會特別詢問關於kendo-notification。我的HTML有:kendo-ui通知範圍變量未在角度控制器中設置
<span kendo-notification="vm.notifier"></span>
<button ng-click="vm.push()">Push it</button>
在我的控制,我有:
(function() {
'use strict';
angular
.module('app.layout')
.controller('Shell', Shell);
function Shell() {
/*jshint validthis: true */
var vm = this;
vm.push = push;
activate();
function activate() {
vm.notifier.show('Loaded', 'info');
}
function push() {
vm.notifier.show('Pushed', 'info');
}
}
})();
我的問題:如果我按一下按鈕,我得到的通知。但是,上載,我得到: 類型錯誤:在激活(http://localhost:57624/app/layout/shell.controller.js:41:24) 在新shell不能讀取的不確定 財產「秀」(http://localhost:57624/app/layout/shell.controller.js:32:9)
我敢肯定,我失去了一些東西有關對象的狀態Angular,但我錯過了什麼,我不能在控制器的加載階段顯示此通知?
偉大的工作,謝謝! – 2015-02-09 14:49:50