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 sftestcontroller { | |
@RemoteAction | |
public static string helloAngular(string name) { | |
return 'User ' + UserInfo.getUserId() + ' says hello ' + name; | |
} | |
} |
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 { Injectable } from '@angular/core'; | |
import { Location, PlatformLocation, LocationStrategy, LocationChangeListener } from "@angular/common"; | |
declare var gSfPageRoot : any; | |
/* | |
A location strategy that works similar to the HashLocationStrategy but | |
works better for Salesforce |
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
EBSSnapshotRole: | |
Type: AWS::IAM::Role | |
Properties: | |
AssumeRolePolicyDocument: | |
Version: '2012-10-17' | |
Statement: | |
- Effect: Allow | |
Principal: | |
Service: automation.amazonaws.com | |
Action: |
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
<body> | |
<!-- Removed for brevity --> | |
<app-root></app-root> | |
<script> | |
gSfApiWrapper = null; | |
if (typeof $SFCONTROLLER !== 'undefined') { | |
gSfApiWrapper = $SFCONTROLLER; | |
} | |
function getSfApiWrapper() { | |
return gSfApiWrapper; |
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
#Only Added/modified lines shown | |
parser.add_argument("--controller", help="") | |
controller = args.controller | |
html = html.replace('<html lang="en">', '<apex:page showheader="false" sidebar="false" standardStylesheets="false" controller="' + controller + '" >' ) | |
html = html.replace('$SFCONTROLLER', controller) |
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 { SalesforceApiService } from './sf-api-service'; | |
import { Component, OnInit } from '@angular/core'; | |
declare var getSfApiWrapper : () => DataApi; | |
//Response information | |
export interface ApiStatus { | |
statusCode: number; | |
status: boolean; | |
code: string; |
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
<app-root></app-root> | |
<script> | |
<!-- Only Added lines shown --> | |
gSfStaticRoot = "{!URLFOR($Resource.#RESOURCES#, 'favicon.ico')}" | |
if (!(gSfStaticRoot[0] === "{")) { //in local mode this will not have been replaced | |
gSfStaticRoot = gSfStaticRoot.substr(0, gSfStaticRoot.lastIndexOf('/')) + '/'; | |
} else { | |
gSfStaticRoot = ""; | |
} |
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
#only added lines shown | |
parser.add_argument("--assets", help="") | |
args = parser.parse_args() | |
assetsName = args.assets | |
html = html.replace('#RESOURCES#', assetsName) |
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
declare var getSfStaticResourceRoot : () => string; | |
export function getStaticPathForResource(resourcePath : string) { | |
return getSfStaticResourceRoot() + resourcePath; | |
} | |
/* | |
* Ensures a static asset path gets the right prefix | |
*/ | |
@Pipe({name: 'staticpath'}) |
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
<!--The content below is only a placeholder and can be replaced.--> | |
<div style="text-align:center"> | |
<h1> | |
{{title}}! | |
</h1> | |
<img [src]="'assets/salesforce.png' | staticpath"> | |
</div> | |
<h2>Here are some links to help you start: </h2> | |
<ul> | |
<router-outlet></router-outlet> |