You need to sign in to do that
Don't have an account?
Abhilash Mishra 13
Remoting with angular js
Hi I am using angular js and remoteaction to modify the data on the page My code is
Please help
<---------visualforce page------> <apex:page controller="testangular"> <apex:includescript value="//ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"/> <apex:stylesheet value="{!URLFOR($Resource.EshopResource,'EShopResource/EshopProduct.css')}"/> <apex:stylesheet value="{!URLFOR($Resource.EshopResource,'EShopResource/fonts.css')}"/> <style> .v-align{ vertical-align: middle !important; } </style> <div ng-app="myApp" ng-controller="customersCtrl"> {{names}} <button ng-click="letsset()">Try me</button> </div> <script> function myfunc(){ } var a; var app = angular.module('myApp', []); app.controller('customersCtrl', function($scope,$window) { $scope.names='Firstname'; $scope.letsset=function(){ testangular.actfast($scope.names,function(result,event){ if (event.status){ $scope.names=result; } }); } }); </script> </apex:page> <!---controller---> public with sharing class testangular { @remoteaction public static string actfast(string s){ return s=='Firstname'?'LastName':'Firstname'; }code works fine but the view changes abnormaly. some times lastname appear as soon as try me is clicked some time i need to double click
Please help
All Answers
Controller works fine. its the the value of expression {{names}} that does not reflet change even after($scpoe.names =result)
Thanks :)
That Worked..................