-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(playground): refactor demo to new ngMetadata api
- Loading branch information
Showing
10 changed files
with
92 additions
and
28 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
//main entry point | ||
import {bootstrap} from 'ng-metadata/ng-metadata'; | ||
import {bootstrap} from 'ng-metadata/platform'; | ||
import {AppModule} from './app'; | ||
|
||
bootstrap(AppModule); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import {Injectable} from 'ng-metadata/core'; | ||
|
||
export type TodoModel = { | ||
label: string, | ||
complete: boolean | ||
} | ||
|
||
@Injectable() | ||
export class TodoStore { | ||
|
||
// have some dummy data for the todo list | ||
// complete property with Boolean values to display | ||
// finished todos | ||
private _todos: TodoModel[] = [ | ||
{ | ||
label: 'Learn Angular', | ||
complete: false | ||
}, { | ||
label: 'Deploy to S3', | ||
complete: true | ||
}, { | ||
label: 'Rewrite Todo Component', | ||
complete: true | ||
} | ||
]; | ||
|
||
get todos() { | ||
|
||
return angular.copy( this._todos ); | ||
|
||
} | ||
|
||
set todos( value ) { | ||
|
||
this._todos = angular.copy( value ); | ||
|
||
} | ||
|
||
} |
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
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