我想用 nodeJS 和 angular2 作为客户端框架创建应用程序。我已经创建了节点项目,并在公共文件夹中使用 angular-cli 创建了整个 Angular 项目。我在 nodeJS 中有路由
// api routes
app.get('/api/getSomeData', function(req, res){
res.json({'data': 'Dummy Data'});
});
// Redirect all other routes to angular index file
app.get('*', function(req, res){
res.sendFile(__dirname + '/public/src/index.html');
});
我不能提供 angulars index.html 页面。我不知道我是否必须构建角度以及如何构建。