Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 从我的Angular 6 web应用程序运行powershell命令_Javascript_Html_Angular_Powershell_Web Applications - Fatal编程技术网

Javascript 从我的Angular 6 web应用程序运行powershell命令

Javascript 从我的Angular 6 web应用程序运行powershell命令,javascript,html,angular,powershell,web-applications,Javascript,Html,Angular,Powershell,Web Applications,我刚刚启动angular和typescript,并使用命令“ng new myapp”创建了一个web应用程序。我想从我的web应用程序运行powershell命令。有人能帮我吗 这是我创建项目后的文件结构- 这不可能仅通过角度应用实现。如果网站能够执行命令,这将是一个重大的安全问题。如果您想通过按Angular中的按钮来执行某些powershell命令,则需要一个带有的f.e.节点服务器。在angular中,您只需调用节点api,服务器将执行命令。详细解释。为什么要这样做?我正在创建一个仪表板

我刚刚启动angular和typescript,并使用命令“ng new myapp”创建了一个web应用程序。我想从我的web应用程序运行powershell命令。有人能帮我吗


这是我创建项目后的文件结构-

这不可能仅通过角度应用实现。如果网站能够执行命令,这将是一个重大的安全问题。如果您想通过按Angular中的按钮来执行某些powershell命令,则需要一个带有的f.e.节点服务器。在angular中,您只需调用节点api,服务器将执行命令。

详细解释。为什么要这样做?我正在创建一个仪表板,用于从web应用程序运行powershell命令。这可能是我在创建项目后的文件结构,我应该在其中添加代码-tutorialspoint.com/angular4/images/final_file_structure。jpg@thechosenone可以将其作为单独的应用程序放在不同的目录中,也可以将其放在
/api/
中。真的,这取决于你。