Navigate To ListView
List View
Navigation_ex.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction,lightning:hasPageReference,lightning:isUrlAddressable"
access="global" >
<lightning:navigation aura:id="navigate" />
<lightning:button label="Lightning Navigate" onclick="{!c.navigate}"
variant="brand"/>
</aura:component>
JS
({
navigate : function(component, event, helper) {
var nagigateLightning = component.find('navigate');
var pageReference = {
type: 'standard__objectPage',
attributes: {
objectApiName: 'Account',
actionName: 'list'
},
state: {
filterName: 'MyAccounts'
}
};
nagigateLightning.navigate(pageReference);
}
})
OutPut:
Navigation_ex.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction,lightning:hasPageReference,lightning:isUrlAddressable"
access="global" >
<lightning:navigation aura:id="navigate" />
<lightning:button label="Lightning Navigate" onclick="{!c.navigate}"
variant="brand"/>
</aura:component>
JS
({
navigate : function(component, event, helper) {
var nagigateLightning = component.find('navigate');
var pageReference = {
type: 'standard__objectPage',
attributes: {
objectApiName: 'Account',
actionName: 'list'
},
state: {
filterName: 'MyAccounts'
}
};
nagigateLightning.navigate(pageReference);
}
})
OutPut:
Comments
Post a Comment