jokade / angulate2

Scala.js bindings for Angular
MIT License
87 stars 15 forks source link

Get an Injection Error when injects nothing. #18

Closed satoshi-m8a closed 8 years ago

satoshi-m8a commented 8 years ago

I created a service that annotated with @Injectable like the following

@Injectable
class HeroService {
  val heroes: js.Array[Hero] = js.Array(
    Hero(11, "Mr. Nice"),
    Hero(12, "Narco")
  )
}

it generated annotation.js which contains HeroService.parameters = [[]];. It seems to be unnecessary and cause an exception.

EXCEPTION: Cannot resolve all parameters for '$c_LHeroService'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '$c_LHeroService' is decorated with Injectable.

when I manually remove the line from annotation.js It performed well.