function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
<apex:page standardStylesheets="false" cache="false" showHeader="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0" controller="angularController"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.15/angular-ui-router.js"></script> <body ng-app="uiTest"> <div ng-controller="searchController"> <input type="text" ng-model="inputString"/> {{ inputString }} <input type="button" ng-click="queryAccount();" value="button"/> </div> <script type="text/javascript"> (function(){ var uiTestApp = angular.module('uiTest',['ui.router']); uiTestApp.controller('searchController' ,function ($scope, $filter,$http){ $scope.queryAccount = function(){ inputString = $scope.inputString; Visualforce.remoting.Manager.invokeAction( '{!$RemoteAction.angularController.queryAccount}', inputString, function(result, event) { if (event.status) { alert(result); } else { alert(event); } }, { buffer: true, escape: true, timeout: 30000 } ); }; }); })(); </script> </body> </apex:page>
global with sharing class angularController{ @RemoteAction global static string queryAccount(string inputVa){ return inputVa; } }
I am passing value to the controller and returning same value to the page again
Here is the small code for your scenario
Let me know if you have any issues with the code.
Thanks,
pRAMODH.