angularjs - ng-click inside cell template does not trigger function in controller -


I've created a plunker here:

When I click in the U-Grid cell Nothing happens after seeing what I expect that the test function is performed and a warning text is shown with 'test', but that is not the case.

What's going wrong here?

Ui-grid 3.0 The latest release html cell template:

HTML

  & lt; Div ng-click = "test ()" ng switch = ". Row.entity [row.grid.columns.indexOf (col)] isPeriod" & gt; & Lt; Div ng-switch-when = "true" & gt; & Lt; Tabset & gt; & Lt; Tab & gt; & Lt; Tab-title & gt; & Lt; I class = "glyphicon glyphicon-book" & gt; & Lt; / I & gt; & Lt; / Tab-heading & gt; Term ID: {{row.entity [row.grid.columns.indexOf (col)]. Id}} & lt; / Tab & gt; & Lt; Select the tab = "Alert (in)" & gt; & Lt; Tab-title & gt; & Lt; I class = "glyphin glyphine-bell" & gt; & Lt; / I & gt; & Lt; / Tab-title & gt; {{Row.entity [row.grid.columns.indexOf (Col.)]. Content}} & lt; / Tab & gt; & Lt; / Tabset & gt; & Lt ;! - Duration templates - & gt; & Lt; / Div & gt; & Lt; Div ng-switch-when = "false" & gt; & Lt; Div & gt; Hello template below & lt; / Div & gt; & Lt; / Div & gt; & Lt ;! - AmpiRyiodometlet - & gt; & Lt; / Div & gt;  

Administrators:

  'Strict use'; Controller ('DateplannerDayController', function ($ scope, $ state) {var columnHeaderDates = ['col1', 'col2', 'col3', 'col4', 'col5', 'col6' ',' col7 '] $ scope $ Column.text = function {Alert ('test');}; $ scope.gridOptions = {rowHyight: 200, data: data, enabling: saving: wrong, enabled columnMenu: wrong, column defects: $ scope.column, onRegisterApi: function (GridApi) {$ Scope.gridApi = gridApi; $ scope.gridApi.core.addRowHeaderColumn ({name: 'rowHeaderCol', displayName: '', width: 100, cell template: '& lt; di V & gt; line header template & lt; / div & gt; '});}}; create column headers (column headers) {var columnDefinition S = []; (Var i = 0; i & lt; columnHeaders Length; i ++) {var column = {name: column header [i], cell template: 'lessonplanner.day.celltemplate.html', field: i + 'x'} columnDefinitions. Push (column);} return column design; }});  

This page was popping up in my searches and I missed the solution in notes. To summarize, you need to use external psychopsy and see


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -