I am very new to golang and web development I went through http concepts and also completed go tour. I have a good knowledge on Angular 2 and thus created a simple login page front-end however I am finding difficulty connecting it to golang
I tried using above code to connect to my client and atleast handle it but it gives me error Uncaught SyntaxError: Unexpected token < … also I dont understand how I will target inputs from the angular forms to get data from there so that i can authenticate it on my application…
The “Uncaught SyntaxError: Unexpected token” is a Javascript error, do you get this error when you serve the app with Angular’s dev tools as well?
I just want to make sure I understand what you are trying to do. Do you simply want a Go server to serve your Angular app, or do you want Go to handle the HTTP requests coming in from the Angular app?
yes I simply wanted to serve my angular code via golang also … I wanted to know like normally we make different html files and target them for inputs and outputs via golang will the same concept work in angular as well … if i put those codes in different components of angular and try to fetch data via a form.
and no I didnt have any error when running the app normally
@dyxj well i dont understand gorrilla thing i am trying to learn things without any framework and i wrote an equivalent code there for it which should work but i dont know for some reason it doesnt actually this worked for me once beofore
Sorry it took me too much time to respond i was on vacation …