我想完全理解如何在静态和动态文件中使用相对和绝对url地址。
~ :
/ :
.. : in a relative URL indicates the parent directory
. : refers to the current directory
/ : always replaces the entire pathname of the base URL
// : always replaces everything from the hostname onwards
当您在没有虚拟目录的情况下工作时,这个示例很简单。但我正在处理虚拟目录。
Relative URI
我有一个使用angularjs的应用程序,我想开始将这个应用程序重写为Angular2。不幸的是,当body和ng-app一样时,最初的应用程序是Asp.Net MVC的混合体。
我想在Angular2中执行类似的方法,将AppComponent选择器设置为body。因此,我将能够一步一步地将旧的应用程序重写为新的组件。
我的问题是模板在组件中是必需的。这是不是有可能没有模板,因为html将从服务器打印?
目前它是这样工作的。当用户点击页面服务器返回html
<html>
<body ng-app="flymark">
Here could be an