All Categories

  • Angular2 - Try angular.io's tutorial

    5/29/2016 -
    Start doing angular2's tutorial import { Component } from '@angular/core'; export class Name { id: number; first: string; } const NAMES: Name[] = [ { id: 11, first: 'Mr. Nice' }, { id: 12, first: 'Narco' }, { id: 13, first: 'Bombasto' }, { id: 14, first: 'Celeritas' }, { id: 15, first: 'Magneta' }, { id: 16, first: 'RubberMan' }, { id: 17, first: 'Dynama' }, { id: 18, first: 'Dr IQ' }, { id: 19, first: 'Magma' }, { id: 20, first: 'Tornado' } ]; @Component({ selector: 'my-app', template: ` {{title}} {{n.id}}: {{n.first}} {{selectedName.id}} name: `, styles: [` h6 { font-size: small; } ul li.selected { font-size: large; } `] }) export class AppComponent { title = 'Awesome'; names = NAMES; onSelect(name: Name) { this.selectedName = name; console.
    Angular2
  • Getting Start with TypeScript

    5/1/2016 -
    URL where to download TypeScript gulp-typescript grunt-typescript TypeScript Document TypeScript Release Note Use TypeScript with Gulp TypeScript Version How to check TypeScript's version by MS Command. Type tsc -v will show TypeScript's version. tsc -v Version 1.0.3.
    TypeScript
  • Angular2 StackOverflow List

    5/29/2016 -
    TypeScript Build error <h3>Html comment on Angular decorator</h3> <p>Now, you want to add html comment to angular decorator, following will fail.</p> <pre class="language-javascript">@Component({ selector: 'my-app', template: ` &lt;h2&gt;{{title}}&lt;/h2&gt; //&lt;h1&gt;{{name.first}} {{name.last}}&lt;/h1&gt; /* &lt;div&gt; &lt;label&gt;first name: &lt;/label&gt; &lt;input [(ngModel)]="name.first"/&gt;&lt;br&gt; &lt;label&gt;last name: &lt;/label&gt; &lt;input [(ngModel)]="name.
    Angular2