私は、Nodejs と一緒に angular を使用して、capacitorjs を使用してネイティブ アプリを構築しています。また、アプリ自体内に Web サーバーを構築しようとしています。localhost サーバーでアプリをテストしますが、それとは別のサーバーを実行する必要があります。次のようなものです。
import { Component, OnInit } from '@angular/core';
import { Plugins } from '@capacitor/core';
import * as $ from 'jquery';
import * as http from 'http';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
title = 'app';
ngOnInit() {
$('#HelpBtn').click(function() {
$('#Info').fadeToggle()
})
}
btnClick() {
http.createServer(function (req, res) {
res.write('Hello World!'); //write a response to the client
res.end(); //end the response
}).listen(8080); //the server object listens on port 8080
}
}
コンデンサー.jsと一緒に実行されているので、どちらのフレームワークにも私を助けることができる組み込みのコンポーネントまたはモジュールはありますか? できれば.htmlファイルをレンダリングできるものですか? このようなもの