function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
raji Gallaraji Galla 

AngularJs binding expression is not working in visualforce

Hi All,
how to build Angular tags to visualforce tags?
Please find the following code. i didnt get values from script
<apex:page docType="html-5.0">

<html>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>

<div ng-app="myApp" ng-controller="myCtrl">
{{ firstName + " " + lastName }}
</div>

<script>
var app = angular.module('myApp', []);
app.controller("myCtrl", function($scope) {
    $scope.firstName = "John";
    $scope.lastName = "Doe";
});
</script>

</body>
</html>

</apex:page>
I am getting  output as:      {{ firstName + " " + lastName }}
values are not binding?
Thanks in advance.
Raji
 
Alex SelwynAlex Selwyn
Your Angular resource should be 'https'. or you can use as static resource.

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>

Browser's console log can be very helpful in troubleshooting browser problems.
raji Gallaraji Galla
Hi, we are not using Static Resource. how to solve this. Thanks, Rajeswari
Alex SelwynAlex Selwyn
Use 'https' instead of 'http'

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>