I have something like this in my visualforce I need to pass vars to my component because all files are in the Static Resource.
which is the correct way?
var opp="{!opportunity}";
var resource="{!URLFOR($Resource.components,'app/')}";
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/main')
.then(null, console.error.bind(console));
Static Resource app/main.ts
import { bootstrap } from 'angular2/platform/browser';
import { AppComponent } from './app.component';
bootstrap(AppComponent);
Static Resource app/app.component.ts
import { Component } from 'angular2/core';
@Component({
selector: 'pm-app',
templateUrl: 'app/app.component.html',
})
export class AppComponent {
/* I NEED VALUES HERE*/
opp: string = '';
}