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.
Angular 2 itself is built using TypeScript.
It is, however, worth noting that Angular 2 fully supports the use of TypeScript instead of restricting users to plain JavaScript. TypeScript is a programming language that's a superset of JavaScript.
You can use unpkg.com:
https://unpkg.com/@angular/[email protected]/bundles/core.umd.js
https://unpkg.com/@angular/[email protected]/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
Plunker Example Angular es5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With