Can't access scope inside header template inside component
See original GitHub issueworking demo with controller-as syntax: http://ng-table.com/#/formatting/demo-header-cell-full
my demo with angular component http://plnkr.co/edit/IOJZfWFlJEWo93PWX4Xl?p=preview
Seems like custom template headerCheckbox.html
can’t get access to $ctrl variable
I hope author still works on this plugin. It’s really great and it’s my first problem with it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
No access to scope variables directly inside ng-template
So I recently moved some repeated markup into ng-template blocks, and I noticed that inside the blocks, I do not get direct access...
Read more >Google C++ Style Guide
Do not use Namespace aliases at namespace scope in header files except in explicitly marked internal-only namespaces, because anything imported into a namespace ......
Read more >Slots - Vue.js
Everything in the parent template is compiled in parent scope; ... useful for slot content to have access to data only available in...
Read more >Angular ng-content and Content Projection: A Complete Guide ...
Component Design Problem 3 - Capturing plain browser events of elements inside a template; Component Design Problem 4 - Custom third party input ......
Read more >Template Designer Documentation - Jinja
To comment-out part of a line in a template, use the comment syntax which is by ... However, per default blocks may not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@renaudaste I also ran to this problem and solved it in the ugly way.
my.html
myComponent.js
What I have done is binding the component’s controller to its scope and call it inside child’s scope since child’s inherit from parent’s. I think the reason we cannot use $ctrl in there is because it is reserved for its own scope (child’s scope).
A nicer solution would be nice though.
I have met the same problem, any elegant solution?