I have root element that has logged in user data and on user profile component I am passing logged in user data as props.
But when I try to call User object properties in child component it throws error as undefined. I don't see any value in child component.
app.js
Vue.component("usersmanagment", require("./components/usersmanagment"));
const app = new Vue({
el: "#app",
components: {
'v-select': vSelect
},
data() {
return {
AuthorizedUser: {
Email : "",
FirstName : "",
LastName : "",
CreatedUtcDateTime : "",
IsActive : ""
}
};
},
mounted() {
let vm = this;
vm.getAuthorisedUserProfile();
},
methods: {
getAuthorisedUserProfile() {
let vm = this;
// just return auth user data
}
});
Than on child component I am passing props
module.exports = {
props : ["AuthorizedUser"],
};
and in my view file I am Asp.Net MVC
<usersmanagment inline-template>
<input type="text" class="form-control" v-model="AuthorizedUser.FirstName">
</usersmanagment>
I can see in vue chrome dev tools that Authorized user get updated but its value don't get updated on child component.