Skip to content

bug(rating): There is no directive with "exportAs" set to "index" #482

Closed
@hongbo-miao

Description

@hongbo-miao

After updating to version 1.0.15, RatingComponent does not work well, which works well before.
The code is like this, very simple:

import { Component } from 'angular2/core';
import { RatingComponent } from 'ng2-bootstrap/components/rating';

@Component({
  selector: 'home-component',
  directives: [RatingComponent],
  template: `
    <rating [(ngModel)]="rate" [max]="max"></rating>
  `
})
export class HomeComponent {
  max: number = 5;
  rate: number = 3;
}

When I load this page, I got error:

EXCEPTION: Error: Uncaught (in promise): Template parse errors:
There is no directive with "exportAs" set to "index" ("a-valuemax]="range.length" [attr.aria-valuenow]="value">
<template ngFor #r [ngForOf]="range" [ERROR ->]#index="index">
({{ index < value ? '*' : ' ' }})
<i (mo"): RatingComponent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions