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

It won't work with default "$ctrl" in component view #96

Closed
srokatonie opened this issue Jun 28, 2016 · 7 comments · May be fixed by #98
Closed

It won't work with default "$ctrl" in component view #96

srokatonie opened this issue Jun 28, 2016 · 7 comments · May be fixed by #98

Comments

@srokatonie
Copy link

I was not declaring controllerAs in my component and using default $ctrl in template. sv-root would be just empty div.

After couple of hours I discovered that you have to use controllerAs: 'something' and use it in your template in order to have this directive working.

Hope that helps someone.

@vlio20
Copy link

vlio20 commented Jul 3, 2016

@srokatonie, did you use 1.5 component in your case?

@srokatonie
Copy link
Author

@vlio20 Yes, Angular 1.5.7

@wuzhitian
Copy link

Thanks a lot! It works! :)

@alirezamirian
Copy link

Being forced to use controllerAs: "somethingOtherThan$ctrl" is obviously not a good idea. I think sv-part directive should use an isolated scope. to prevent scope collision.

@vlio20
Copy link

vlio20 commented Apr 10, 2017

@srokatonie, why did you close it?

@igal1c0de4n
Copy link

why close??

@alejandroiglesias
Copy link

alejandroiglesias commented Mar 26, 2018

Stumbled again upon this 😞
It's been a year and a half since this was opened and it seems such a simple fix.

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

Successfully merging a pull request may close this issue.

6 participants