Computed Properties allows you to define auto calculated properties based on other properties. For example, you could have properties firstName and lastName, from which you could create a new property, fullName, which gets updated each time either firstName or lastName changes. For example, data() { return { firstName: "", lastName: "", }; }, computed: { FullName: function() { return this.firstName.concat(this.lastName); }, } The FullName property would be … Continue reading Computed Vs Methods Vs Watch
Category: VueJs
Axios Interceptors and Exception Handling
Handling exceptions globally and gracefully is essential part of any application. This reduces the scattered try-catch cases and enable to handle everything from one point. In this article, we will explore how to implement global exception handling when making Api calls in an SPA design. We will use VueJs for demonstration along with Axios packages to assist the Http calls. Axios … Continue reading Axios Interceptors and Exception Handling
Private Routes using VueJs
Quite often in your application, you could come across when certain pages/routes could be accessed by only authenticated users. And then there are other pages, which could be access be any one. I tend to call them by private routes and public routes. Private Routes requires a certain condition to be met, for example, the user needs to be authenticated. … Continue reading Private Routes using VueJs