Unable to access merge field values inside visualforce component in angularJs -


view:

<div ng-controller = "clportalregistrationcontroller">      <div ng-repeat="(key, value) in objectapifieldsetmap">         {{key}}  {{value}} //this printing correct result         <c:fieldsetcomponent objectapiname="'{{key}}'" fieldset="'{{value}}'" cid="'{{key}}'"                               sectiontitle="section 1" columns="2" textalign="center"></c:fieldsetcomponent>     </div>  </div> 

controller:

$scope.objectapifieldsetmap = {  applications__c: "application_fieldset_one",  clcommon__collateral__c: "collateral_fieldset_one" }; 

now when i'm trying access {{key}},{{value}} inside c:fieldsetcomponent ,its passing string {{key}} , {{value}} , not converted result. how can access values stored inside key, value inside component?

posting solution implemented work around.

turns out cannot access angular merge field values inside visualforce components. instead of manipulating(segregating input key-value pair) values inside angular controller, have push logic apex controller.

<apex:component controller="registrationcontroller" access="global">    <apex:repeat value="{!objectapifieldsetmap}" var="apiname">            <c:fieldsetcomponent objectapiname="{!apiname}" fieldset="{!objectapifieldsetmap[apiname]}"                cid="{!apiname}{!objectapifieldsetmap[apiname]}"                columns="1" textalign="center">           </c:fieldsetcomponent>      </apex:repeat> </apex:component> 

and in apex controller i.e registrationcontroller , have set logic segregate key values map input i'm using inside visualforce component

global class registrationcontroller {  global map<string,string> objectapifieldsetmap {                                {                                    objectapifieldsetmap = arrangeapifieldsetsbyorder();                                    return objectapifieldsetmap;                                    }                                     set;      }      global map<string,string> arrangeapifieldsetsbyorder() {          map<string,string> objectapifieldsetmap =  new map<string,string>();                    /* logic segregation */         return objectapifieldsetmap;     } } 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -