javascript - ng-repeat does not update table display when changed -
My HTML does not display table values in the form when it is updated here is the code:
< Pre> & lt; Div ng-controller = 'PersonalActionFieldController' & gt; & Lt; Table & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; Private Action Field (From Inform-Lawson) & lt; / Th & gt; & Lt; Th & gt; Form field & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; & Lt; Select ng-model = "name" ng-options = "parameters for items in item action action" & gt; & Lt; / Select & gt; & Lt; Tr ng-repeat = "Action in action" field "& gt; {{Action.actionParam}}
And here is Javascript:
Function PersonalActionFieldController ($ Range, $ http, $ rootScope) {$ rootScope. $ Watch ('actionTypeName', function (newActionTypeName) {Warning ('hey, myVar has changed!'); $ Scope ActionFields = null; $ scope.httpData = '{"actionName": "' + $ rootScope.actionTypeName + '"}'; $ http post ('http: // localhost: 82 / rs / transformtritter / lawsonfields', $ scope .httpData) .success (function (data, position, header, config) {$ scope.actionFields = data;}) Panic (function (data, position, header, config) {// some error Here is the warning warning ('error');});});
}
This is not an angular problem but the use of DOM elements: the content of a tag tag is zero or more tr elements, not a selection ()
outside of the table or TR tag About selecting inside
Comments
Post a Comment