Notable to link javascript object and angularjs in controllers -
i trying develop mobile application in getting json object using javascript page main.js,now trying print object using angualjs controllers,but not find way.can me out on this?
function written in main.js`
function getviewcolumnssuccess(result){ var httpstatuscode = result.status; if (200 == httpstatuscode) { var invocationresult = result.invocationresult; var issuccessful = invocationresult.issuccessful; if (true == issuccessful) { var result = invocationresult.text; //var finalcol=reult; } else { alert("error. httpstatuscode=" + httpstatuscode); } } }
the var result want in democontroller in page
app.controller('tablectrlnew', function($scope,$http) { });
first controllers not print data, should databinding, in views.
for example: in controller have var;
$scope.name="john doe";
so, print in view, shoud print in view has scope, print in 1 view(html) simple like:
<span class="labelname"> {{name}}</span>
it data-binding, automatically print data controller view, remember, must in same scope works.
regards.
Comments
Post a Comment