mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 14:01:20 +08:00
Spring cleaning and lists
This commit is contained in:
@ -1,15 +1,7 @@
|
|||||||
<ion-view view-title="Top">
|
<ion-toolbar *header><ion-title>Top</ion-title></ion-toolbar>
|
||||||
<ion-content>
|
|
||||||
|
|
||||||
<button pop>Back</button>
|
<ion-content class="padding">
|
||||||
|
|
||||||
<ion-list>
|
<ion-list><ion-item *ng-for="#story of stories">{{story.title}}</ion-item></ion-list>
|
||||||
|
|
||||||
<item *ng-for="#story of stories">
|
</ion-content>
|
||||||
{{story.title}}
|
|
||||||
</item>
|
|
||||||
|
|
||||||
</ion-list>
|
|
||||||
|
|
||||||
</ion-content>
|
|
||||||
</ion-view>
|
|
||||||
|
@ -5,7 +5,7 @@ import {Ancestor} from 'angular2/src/core/annotations_impl/visibility';
|
|||||||
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
|
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||||
import {View} from 'angular2/src/core/annotations_impl/view';
|
import {View} from 'angular2/src/core/annotations_impl/view';
|
||||||
|
|
||||||
import {Content, Nav, List, Item} from 'ionic/ionic';
|
import {NavController, HeaderTemplate, Toolbar, Content, List, Item} from 'ionic/ionic';
|
||||||
|
|
||||||
import {HackerNews} from '../hn'
|
import {HackerNews} from '../hn'
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ console.log('Angular directives', NgFor, Content, List, Item);
|
|||||||
})
|
})
|
||||||
@View({
|
@View({
|
||||||
templateUrl: 'pages/top.html',
|
templateUrl: 'pages/top.html',
|
||||||
directives: [Content, NgFor, List, Item]
|
directives: [HeaderTemplate, Toolbar, Content, NgFor, List, Item]
|
||||||
})
|
})
|
||||||
export class HNTopStories {
|
export class HNTopStories {
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -33,7 +33,6 @@ export class HNTopStories {
|
|||||||
type: "story",
|
type: "story",
|
||||||
url: "http://minusbat.livejournal.com/180556.html"
|
url: "http://minusbat.livejournal.com/180556.html"
|
||||||
}];
|
}];
|
||||||
return;
|
|
||||||
|
|
||||||
var APIUrl = 'https://hacker-news.firebaseio.com/v0';
|
var APIUrl = 'https://hacker-news.firebaseio.com/v0';
|
||||||
|
|
||||||
|
@ -2,9 +2,7 @@ import {bootstrap} from 'angular2/angular2'
|
|||||||
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
|
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||||
import {View} from 'angular2/src/core/annotations_impl/view';
|
import {View} from 'angular2/src/core/annotations_impl/view';
|
||||||
|
|
||||||
import {Content} from 'ionic/components/content/content';
|
import {Content, List, Item} from 'ionic/ionic';
|
||||||
import {List} from 'ionic/components/list/list';
|
|
||||||
import {Item} from 'ionic/components/item/item';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({ selector: 'ion-app' })
|
@Component({ selector: 'ion-app' })
|
||||||
|
Reference in New Issue
Block a user