我一直在尝试从角度2下载源代码,但我无法找到它.我查看了他们的github存储库,但无法识别正确的存储库.有人能指出一个或一个有效的CDN,所以我可以下载它吗?
编辑:我需要在不使用Node.Js和NPM的情况下获取源代码.
yur*_*zui 12
你可以使用unpkg.com:
https://unpkg.com/@angular/core@4.0.1/bundles/core.umd.js
等等.
let { Component, NgModule } = ng.core;
@Component({
selector: 'my-app',
template: `
<h1>Hello, {{ name }}</h1>
<button (click)="increment()">Click {{ counter }}</button>
`,
})
class HomeComponent {
counter = 0;
name = 'Angular 2'
increment() {
this.counter++;
}
}
const { BrowserModule } = ng.platformBrowser;
@NgModule({
imports: [ BrowserModule ],
declarations: [ HomeComponent ],
bootstrap: [ HomeComponent ]
})
class AppModule { }
Run Code Online (Sandbox Code Playgroud)
如果您不想使用打字稿,那么这里就是
| 归档时间: |
|
| 查看次数: |
5225 次 |
| 最近记录: |