如何获得有效的Angular 7 systemjs.config.js
,如文章中所述:Setting Up Angular from Scratch和updated systemjs.config.js
version for Angular 6。
我需要像在Angular 2的种子systemjs.config.js
中一样在我的Scala Play应用程序中集成Angular 7 UI组件。请在play-angular-typescript.g8中将Scala Play视图与Angular 2罪魁祸首的集成
index.scala.html
这是@()
<!doctype html>
<html lang="en" data-framework="angular2">
<head>
<base href="/" />
@* In this version of the application the typescript compilation is done by the play framework.
The browser downloads .js files. *@
<meta charset="utf-8">
<title>Angular Tour of Heroes</title>
<link rel="stylesheet" href="assets/stylesheets/styles.css">
<script type='text/javascript' src='@routes.Assets.versioned("lib/core-js/client/shim.min.js")'></script>
<script type='text/javascript' src='@routes.Assets.versioned("lib/zone.js/dist/zone.js")'></script>
<script type='text/javascript' src='@routes.Assets.versioned("lib/systemjs/dist/system.src.js")'></script>
<script type='text/javascript' src='@routes.Assets.versioned("systemjs.config.js")'></script>
@* our app is downloaded as individual javascript files by SystemJs after compilation by sbt-typescript*@
<script>
System.import('assets/app/main.js').catch(function(err){ console.error(err); });
</script>
</head>
<body>
<my-root>Loading...</my-root>
</body>
</html>
,允许将Angular 2加载到Scala视图中:
systemjs.config.js
我想将现有的Scala Play应用作为主要的MVC,并仅在某些Play视图中使用Angular 7组件。
这里是Angular 7的示例systemjs.config.js。