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 {Injectable} from 'angular2/core'; | |
import {Tab} from './tab'; | |
@Injectable() | |
export class TabService { | |
private static _tabs: Tab[] = [new Tab(1, "Dog Dingo", "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut."), | |
new Tab(2, "Horse Harry", "At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.")]; | |
getTabs(): Promise<Array<Tab>> { |
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 class Tab { | |
private _active: boolean; | |
constructor(private _id: number = -1, public title?: String, public content?: String) { | |
} | |
set active(active: boolean) { | |
this._active = active; | |
} | |
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
//Example 1: inline definition... not configurable :-( | |
angular.module("myApp", []) | |
.provider("Dummy", <ng.IServiceProvider>{ | |
'$get': function() { | |
return { value: 1 }; | |
} | |
}) | |
.config(["DummyProvider", function(Dummy: ng.IServiceProvider) { |
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
#weather { | |
font-size: 20px; | |
font-weight: bold; | |
border: 2px solid black; | |
padding: 20px; | |
} | |
.rainy { |
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
.arg { | |
border: 1px solid blue; | |
background: lightgrey; | |
margin: 5px; | |
} | |
pre { | |
border: 1px dotted blue; | |
background: lightgrey; | |
padding: 5px; |
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
.arg { | |
border: 1px solid blue; | |
background: lightgrey; | |
margin: 5px; | |
} | |
pre { | |
border: 1px dotted blue; | |
background: lightgrey; | |
padding: 5px; |
NewerOlder