Menu
Pinkesh's Notes
  • Home
  • Crossword
  • Technology
  • Site Map
  • Contact Me
  • About Me
Pinkesh's Notes

Category: Technology

VueJS: Call child component’s method from a parent

Posted on August 15, 2019August 19, 2019 by jainpinkesh

Put ref=”childComponent” on the child component’s instance in the parent component and access it from that ref’s method like this: <childcomponent ref=”childComponent” /> var self=this; self.$refs.chldComponent.<method>

+

VueJS: Unknown custom element

Posted on August 15, 2019August 15, 2019 by jainpinkesh

Unknown custom element: – did you register the component correctly? For recursive components, make sure to provide the “name” option. When declaring child component in the components section of the export in the parent component, explicitly specify the name like this: export { components :{ myComponent: MyComponent }, data(){ return {}; }

+

VueJS: Pass data from child component to parent component.

Posted on August 15, 2019August 15, 2019 by jainpinkesh

Create prop in child component: props: { childDataProp: { type: Array, default () => []}} Create a data variable: data(){ return {childData:[]};} Populate value for the data variable created above. childData = [1,2,3,4,5]; Use $emit to expose an event as the first argument and data as the second argument: this.$emit(‘eventName’,childData); In Parent Component: a. In…

+

HICKERY – xcopy Command

Posted on January 4, 2019January 5, 2019 by jainpinkesh

Tired of all the prompts while copying files? Here is a better/efficient way to copy files around. This command is especially helpful when copying tens of gigabytes of files, for example backing up your c drive into an external hard drive. Here we have some files in the source folder: You can use the following…

+

Recent Posts

  • VueJS: Call child component’s method from a parent
  • VueJS: Unknown custom element
  • VueJS: Pass data from child component to parent component.
  • Economics – 12th HSC
  • Thoughts and It’s effects

Categories

  • Crossword
  • General
  • Technology


©2026 Pinkesh's Notes | WordPress Theme by Superb Themes