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

Error when access modules injected with 'public' in constructor (inside template) #153

Closed
bertrandg opened this issue Nov 16, 2016 · 0 comments
Assignees

Comments

@bertrandg
Copy link

Here is a simple example better to understand:

// No error

@Component({
  selector: 'sg-hero-cmp',
  template: `<h1>{{ test.get() }}</h1>`
})
class HeroComponent {
  public test: Test
	
  constructor(test: Test) {
  	this.test = test;
  }
}


// Error: The property "test" that you're trying to access does not exist in the class declaration. (no-access-missing-member)

@Component({
  selector: 'sg-hero-cmp',
  template: `<h1>{{ test.get() }}</h1>`
})
class HeroComponent {
	
  constructor(public test: Test) {}
}

Tested with 1.0.0-beta.4 and directly on http://codelyzer.com/

@bertrandg bertrandg changed the title Error when access modules injected with 'public' in constructor Error when access modules injected with 'public' in constructor (inside template) Nov 16, 2016
@mgechev mgechev self-assigned this Nov 23, 2016
@mgechev mgechev added this to the Beta 2 - Trichocolea mollissima milestone Nov 23, 2016
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