Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Access And Change Parent Variables From A Child Component With Vue.js

When working with single page web applications (SPA), chances are you’re going to be using a router or some kind of parent and child component structure. In these scenarios, the parent components probably hold their own functions and variables that may at some point in time need to be accessed by the child component. Take for example an application that has authentication. The parent component might manage the authentication state while the child component might be a login form, secure content, or something else. When logging in, you might need to change the authentication state of the parent. This is just one of many possible examples where the child and parent need to interact.

We’re going to see how to interact with a parent component from a child component in an application created with the Vue.js JavaScript framework.

Read More

Nested Routing In A NativeScript Angular Application For Android And iOS

When building mobile applications you’ll often find yourself needing to create child components. What do I mean by child components? Take for example a mobile application with two different screen groupings, one where the user is not signed in and the other where the user is signed in. In each of these groupings you could have multiple screens where the user is signed in and multiple screens where the user is not signed in. Each screen under the parent grouping can be considered a child component and they could possibly share a template from the parent. These child components often require nested routing to occur for a successful navigation.

We’re going to see how to create nested routes in a NativeScript mobile application built with Angular. You’ll see that things aren’t much different from creating standard routes in an Angular application.

Read More

Search

Follow Us

The Polyglot Developer

Subscribe

Subscribe to the newsletter for monthly tips and tricks on subjects such as mobile, web, and game development.

The Polyglot Developer

Support This Site