Skip to main content

Posts

Showing posts with the label vue3.0

Ionic & Vue Sample Application Using Vuex State Management

In this article, we are going to create a sample application of Ionic & Vue our main target is to implement Vuex State Management. Create A Sample App Of Ionic5 Using Vue : To begin to create an Ionic application, we should have the Ionic CLI installed in our system environment. Command to install latest Ionic CLI: npm install -g @ionic/cli@latest Now run the following command to create Ionic5 using the Vue application. Command to create Ionic Vue application ionic start your_app_name blank --type vue Now run the following command to install Vuex into our Ionic&Vue app. Vuex Command npm install vuex@next --save TypeScript Or Javascript: By default Ionic sample created with the support of TypeScript in any library like angular, react, and vue. Typescript can be chosen to develop our application. But in the case of Vue most of the developers or preferred to choose javascript syntax instead of Typescript for application development. So to make our Ionic Vue application use j

A Getting Started Sample On Ionic5 Application Using Vue

In this article, we are going to understand the steps for installing and creating the Ionic5 sample application using Vue and also run our sample on the android mobile device emulator. Create A Sample App Of Ionic5 Using Vue : To begin to create an Ionic application, we should have the Ionic CLI installed in our system environment. Command to install latest Ionic CLI: npm install -g @ionic/cli@latest Now run the following command to create Ionic5 using the Vue application. Command to create Ionic Vue application ionic start your_app_name blank --type vue By default Ionic provides few templated projects here I'm creating the 'blank' project. TypeScript Or Javascript: By default Ionic sample created with the support of TypeScript in any library like angular, react, and vue. Typescript can be chosen to develop our application. But in the case of Vue most of the developers or preferred to choose javascript syntax instead of Typescript for application development. So to m

Part-2 VueJS JWT(JSON Web Token) Authentication(Refresh Token Implementation)

In the  Part-1  we have learned steps to build a VueJS application authentication by using an access token(Jwt token). This is the continuation article, here we are going to understand the steps for implementing refresh token and using access token in the request header to call secured API. NestJS(Nodejs) Todos API: In  Part-1  we discussed steps to set up the Nestjs API. In that API we have a secured endpoint called 'Todos'. In the next step, we are going to consume this 'Todo' API from our angular application. http://localhost:3000/todos Access Token Authorization To Access Secured Endpoint: Now let's try to access the secured endpoint 'todos' mentioned above in our 'Dashboard' page. Now for this todos, we are going to create another module file like 'todo.js'. src/store/modules/todo.js: import axios from 'axios'; const state = () => ({ todos :[] }); const getters = { getAlltodos(state){ state.todos; } }; const

Part-1 VueJS JWT(JSON Web Token) Authentication(Access Token Implementation)

In this article, we are going to understand the steps for JWT(JSON Web Token) authentication. Here our main focus to fetch the JWT access token to make users log into our VueJS 3.0 application. For maintaining user info we will use Vuex state management. JWT Token: JSON Web Token is a digitally signed and secured token for user validation. The jwt is constructed with 3 informative parts: Header Payload Signature Create A VueJS 3.0 Sample Application: Let's begin by creating a VueJS 3.0 sample application. Command To Install Vue CLI Globally On Your System npm install -g @vue/cli Command To Create A Vue App: vue create your_app_name Required NPM Packages: Need to install the Vue routing library to configure routing into our application. Command To Install Vue Router Library(For Vue3.0) npm install vue-router@4 Need to install the Vuex Store library to configure state management to our application Command To Install Vuex Store Library(For Vue3.0) npm install vuex@next Install