Hi my good teacher Mr. Amr . Thanks alot for your very good explanation . I hope you will do many courses about React , Angular 2 , NodeJs etc.... :)
@AmrSekilly4 жыл бұрын
Thanks, I will!
@mustafaorhan91694 жыл бұрын
Mr. Amr when I write your main.js it diden't work, but when I wrote this code in main.js it began work! window.addEventListener('load', () => { window.vue = new Vue({ el: "#myApp1", data: { product: "samsung", } }) }) but this code dident work, why? const app = new Vue({ el: "#myApp1", data: { product: "samsung", }, });
@AmrSekilly4 жыл бұрын
@@mustafaorhan9169 Where did you put the script tag for main.js? I mean where exactly in the HTML file?
@mustafaorhan91694 жыл бұрын
Dear Mr.Amr, this is my index.html code : Document _____________ {{product}} _____________ ----------------------------------------------------------------------------------------- And this is my main.js code: const app = new Vue({ el: "#myApp", data: { product: "samsung", image: "./images/s1.jpg", }, }) The error is : [Vue warn]: Cannot find element: #myApp I don't know why its work with you and don't work with me !? ----------------------------------------------------------------------------------------- But when I change the code to : window.addEventListener('load', () => { window.vue = new Vue({ el: "#myApp", data: { product: "samsung", image: "./images/s1.jpg", } }) }) its began work !? The question is whats the difference between them ?