I've been trying to download the source code from angular 2, but I was unable to find it. I looked in their github repository, but couldn't identify the correct one. Can someone point me the one or a working CDN so I can download it?
Edit: I need to get the source without using Node.Js and NPM.
You can use unpkg.com:
https://unpkg.com/@angular/core@4.0.1/bundles/core.umd.js
https://unpkg.com/@angular/platform-browser-dynamic@4.0.1/bundles/platform-browser-dynamic.umd.js
and so on.
Here is jsFiddle Example
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 { }
If you don't want to use typescript then here is
Normally you would use angular.io to download the quick-start or CLI using NPM etc. Here is a copy of the CDN: