0
我試圖實現此角碼時,得到TypeError。它圍繞Class({constructor:function(){}})生成錯誤。我一直指出這(https://github.com/angular/angular/commit/cac130eff9b9cb608f2308ae40c42c9cd1850c4d),但不知道如何實施解決方案。重構代碼如何爲我amTypeError - Angular^5.0
我很想知道一種替代方案,因爲我是這種編碼技術的新手。
這是我最近購買的一本關於使用導軌,角度爲 和postgres的書籍。謝謝。
import "hello_angular/polyfills";
import { Component, NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { FormsModule } from "@angular/forms";
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
var CustomerSearchComponent = Component({
selector: "shine-customer-search",
template: '\
<header> \
<h1 class="h2">Customer Search</h1> \
</header> \
'
}).Class({
constructor: function() {
}
});
var CustomerAppModule = NgModule({
imports: [ BrowserModule, FormsModule ],
declarations: [ CustomerSearchComponent ],
bootstrap: [ CustomerSearchComponent ]
})
.Class({
constructor: function() {}
});
**您也可以選擇使用打字稿**,不,這不是真的;) – Alex