Skip to content
This repository was archived by the owner on May 3, 2018. It is now read-only.
This repository was archived by the owner on May 3, 2018. It is now read-only.

#vuejs : How to use parameterized computed property in v-if #138

@Anshul-Batra

Description

@Anshul-Batra

Hi,

I want to use computed

var $App = {    
    'el':'#elDiv',
    'data':{   },   
     computed:{
test(): function { return obj; },
test2(str) : function { return obj[str];}
},
    "methods":{ }
};

Below is my html file:

<template v-repeat="obj : test"></template>
<template v-repeat="obj : test2('items')"></template>

In my html first v-repeat is working fine because it calls the computed function to get an object. But in second v-repeat it calls parameterized computed function. The second v-repeat is not working.

Please share the solutions, how can i use parameterized computed function in v-repeat

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions