Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hongbo-miao opened this issue May 3, 2016 · 2 comments
Closed

Comments

@hongbo-miao
Copy link
Contributor

hongbo-miao commented May 3, 2016

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

@ciriarte
Copy link
Contributor

ciriarte commented May 3, 2016

This one is related to changes on angular 2.0.0-beta.17 and up. It should be fixed in a newer release. There's a couple of PRs pending #472, #481 (either one will do it) that should fix this issue.

@hongbo-miao
Copy link
Contributor Author

@ciriarte thanks! Just realized this issue is similar too #480
So can be closed together later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants