This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, View, coreDirectives } from 'angular2/angular2'; | |
import { Router} from 'angular2/router'; | |
import { SayName } from '../sayname/sayname'; | |
@Component({ | |
selector: 'about' | |
}) | |
@View({ | |
templateUrl: './src/about/about.html', | |
directives: [coreDirectives, SayName] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///<reference path="../../typings/_custom.d.ts" /> | |
import { Component, View } from 'angular2/angular2'; | |
import { RouteConfig, RouterLink, RouterOutlet } from 'angular2/router'; | |
import { Search } from '../components/search/search'; | |
import { Artist } from '../components/artist/artist'; | |
@Component({ | |
selector: 'my-app' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///<reference path="./angular2/angular2.d.ts"/> | |
///<reference path="./angular2/router.d.ts"/> | |
///<reference path="./rx/rx.d.ts"/> | |
///<reference path="./es6-promise/es6-promise.d.ts"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>My App</title> | |
<script src="https://github.jspm.io/jmcriffey/bower-traceur-runtime@0.0.87/traceur-runtime.js"></script> | |
<script src="https://jspm.io/system@0.16.js"></script> | |
<script src="https://code.angularjs.org/2.0.0-alpha.35/angular2.dev.js"></script> | |
<script src="https://code.angularjs.org/2.0.0-alpha.35/router.dev.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../typings/_custom.d.ts" /> | |
import { Component, View } from 'angular2/angular2'; | |
import { RouteConfig, RouterLink, RouterOutlet } from 'angular2/router'; | |
import { Search } from '../components/search/search'; | |
import { Artist } from '../components/artist/artist'; | |
@Component({ | |
selector: 'app' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../typings/_custom.d.ts" /> | |
import { Injectable } from 'angular2/angular2'; | |
@Injectable() | |
export class Spotify { | |
url: string; | |
constructor() { | |
this.url = 'https://api.spotify.com/v1/'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function status(response) { | |
if (response.status >= 200 && response.status < 300) { | |
return Promise.resolve(response); | |
} | |
return response.text().then(function(text) { | |
throw new Error(text); | |
}); | |
} | |
export function text(response) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../../typings/_custom.d.ts" /> | |
import { Component, View, NgFor, Inject } from 'angular2/angular2'; | |
import { RouterLink, RouteParams } from 'angular2/router'; | |
import { Spotify } from '../../services/spotify'; | |
import { status, json } from '../../utils/fetch' | |
@Component({ | |
selector: 'search', | |
viewInjector: [Spotify] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../../typings/_custom.d.ts" /> | |
import { Component, View, NgIf } from 'angular2/angular2'; | |
import { RouterLink, RouteParams } from 'angular2/router'; | |
import { Spotify } from '../../services/spotify'; | |
import { status, json } from '../../utils/fetch' | |
@Component({ | |
selector: 'artist', | |
viewInjector: [Spotify] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../typings/_custom.d.ts" /> | |
import { bootstrap, bind } from 'angular2/angular2'; | |
import { routerInjectables, LocationStrategy, HashLocationStrategy } from 'angular2/router'; | |
import { Spotify } from './services/spotify'; | |
import { App } from './components/app'; | |
OlderNewer