所以我把app.settings放进去了
public static get DateFormat(): string { return 'MM/DD/YYYY';}
Run Code Online (Sandbox Code Playgroud)
然后在我的一个组件的html模板中,我想做这样的事情.
<input [(ngModel)]="Holiday" [date-format]="AppSettings.DateFormat"/>
Run Code Online (Sandbox Code Playgroud)
我有组件
import { AppSettings } from '../../../app.settings';
Run Code Online (Sandbox Code Playgroud)
现在它在html模板中无法像这样访问.有什么办法吗?
我是 PowerShell 的新手。你如何在powershell中覆盖文件?现在写下面的代码正在附加。我想用以下新信息完全覆盖文件。
$someinfo | 添加内容 $FileName
我有一篇文章中的代码。
window.addEventListener('popstate', function (event) {
// The popstate event is fired each time when the current history entry changes.
var r = confirm("You pressed a Back button! Are you sure?!");
if (r == true) {
// Call Back button programmatically as per user confirmation.
history.back();
// Uncomment below line to redirect to the previous page instead.
// window.location = document.referrer // Note: IE11 is not supporting this.
} else {
// Stay on the current page.
history.pushState(null, null, window.location.pathname);
} …Run Code Online (Sandbox Code Playgroud)