A Pen by Nikita Verkhoshintcev on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global class AngularPOC { | |
@RemoteAction | |
webservice static String getContacts() { | |
return JSON.serialize([SELECT Id, Name FROM Contact]); | |
} | |
@RemoteAction | |
webservice static String getContact(String contactId) { | |
return JSON.serialize([SELECT Id, Name, Title, Phone, Email FROM Contact WHERE Id =: contactId][0]); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
declare const Visualforce; | |
interface Contact { | |
Id: string; | |
Name: string; | |
} | |
@Component({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page standardStylesheets="false" sidebar="false" showHeader="false" | |
applyBodyTag="false" applyHtmlTag="false" docType="html-5.0" | |
controller="AngularPOC"> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Meetup</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link rel="icon" type="image/x-icon" href="{!$Resource.AngularPOC + '/favicon.ico'}" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page standardStylesheets="false" sidebar="false" showHeader="false" | |
applyBodyTag="false" applyHtmlTag="false" docType="html-5.0" | |
controller="AngularPOC"> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Meetup</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link rel="icon" type="image/x-icon" href="{!$Resource.AngularPOC + '/favicon.ico'}" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AngularPOC { | |
@RemoteAction | |
public static List getContacts() { | |
return [SELECT Id, Name FROM Contact]; | |
} | |
@RemoteAction | |
public static Contact getContact(String contactId) { | |
return [SELECT Id, Name, Title, Phone, Email FROM Contact WHERE Id =: contactId]; | |
} |
NewerOlder