Are there recommended concepts how to access MySQL from an Angular 2 application?
I\'m new to Angular and Typescript. I found and installed the node-mysql
Communication directly from Angular to Mysql is bad practice (in most cases). Angular runs client side and exposing mysql to it allows for anybody to run arbitrary SQL statements.
The solution is to create an intermidate server. It could run nodejs, to which you can then import node-mysql. The nodejs server could expose a REST api which your angular 2 application consumes.