ngfor

    13热度

    2回答

    我正在尝试在我的Select DropDownList上使用ngFor。已加载应该在下拉列表中的选项。 的代码,你在这里看到: <div class="column small-12 large-2"> <label class="sbw_light">Title:</label><br /> <select [(ngModel)]="passenger.Title">

    3热度

    1回答

    我有组件。 @Component({ selector: 'todo-list', directives: [TodoItemRenderer], providers: [TodoService], template: '<div>'+ '<ul class="list-group">'+ '<li [(ngClass)]="item.class" cl

    2热度

    2回答

    我想在angularjs2使用ngFor访问局部变量在HTML模板,下面 <a *ngFor="#facet of facet_data" class="collection-item" (click)="setToSearchBarWithFilter(facet.category)"> {{facet.category}}<span class="badge">{{facet.cou

    3热度

    3回答

    我正在* ngFor与Ionic 2很好地工作,但我想使用collection-repeat'因为它更适合于广泛的数据。 我加载在construtor数据: import {Page, NavController, NavParams} from 'ionic-angular'; import {ListData} from './list-data'; @Page({ templ

    0热度

    1回答

    处理某些数组项目,但卡住了* ngFor不接受另一个*ngFor提供的动态值。 <table border="2"> <tr> <th rowspan="2">Subject</th> <th colspan="4" *ngFor='#category of json.category_name'>{{category}}</th> <th colspan=

    2热度

    1回答

    我想显示局部变量theme的属性,如theme.name。 这是我*ngFor看起来像 <ul> <li *ngFor="#theme of themes"> <span>theme.name</span> </li> </ul> 我试图用{{theme.name}}为好,但也不能工作。

    6热度

    3回答

    我在计算Angular 2中的ngFor Loop时遇到了问题。我试图开发一个有3列和动态数量的行的网格。我想遍历我的数组,并从左到右添加元素,每三个元素都应该跳到下一行。我使用Ionic Framework 2.0。 我的代码如下所示: <ion-row *ngFor="#m of movies; #i = index" (click)="movieTapped(m)"> <ion-

    0热度

    1回答

    我有2个组件:CommandListComponent和CommandLineComponent。内CommandListComponent模板,我处理的文本字符串click事件: CommandListComponent模板: <li *ngFor="#command of commandList" class="b-command-list__command"><span (click)="c