-
Notifications
You must be signed in to change notification settings - Fork 248
Directive ng-include doesn't work as expected #1415
Comments
This one is probably similar to #1322 and should be fixed at the same time. TL;DR: the template files are not parsed by the transformer yet. A workaround for now is to put all your expressions in the
|
I slightly change you code to make it work: part of demo;
@Controller(selector: '[demo-ctrl]',
publishAs: 'ctrl',
exportExpressions: const ['ctrl'])
class DemoCtrl {
var singleModel = 1;
DemoCtrl() {
new Timer.periodic(new Duration(seconds: 1), (Timer t) {
singleModel++;
});
}
} but it doesn't work. I will wait fix from you team. |
I'll try to take a look at this issue by eow |
Thanks. :) |
Hi. |
I can confirm that "ng-include"d files are not processed by the transformer. We need to progress on #1456 before this can be further worked. (Sorry for the delay). |
Hello, We have the same issue when we use Dart2JS "No getter for 'ctrl'. Let me know when you'll do some progress. |
A little off topic but I was just evaluating angular dart and came via a bug posted to the ui project. Do call stacks usually get 68 deep using this stuff? That seems a bit on the deep / heavy side. |
@vsavkin can you investigate and propose a fix either in 1.0 or post-1.0? |
@akserg can you reproduce the issue on the latest master? |
Hi Victor, Let me check. On 7 October 2014 23:13, Victor Savkin [email protected] wrote:
|
Please open a new issue and reference this one if this is still a concern. |
The problem still exists. Does transformers block in pubspec.yaml file name: angular_ui
On 8 October 2014 20:13, Naomi Black [email protected] wrote:
|
Since ngInclude is not processed by the transormer, the following example won't work:
where included.html is
The transformer does not pick it up because ng-include expressions can be dynamic. The available options are Use componentsThe transformer picks up components' templates. Use exportExpressions
Add
|
Thank you, Victor. On 8 October 2014 23:56, Victor Savkin [email protected] wrote:
|
I'm busy migrate Angular Dart UI on latest Dart SDK 1.6.0 and Angular Dart 0.14.0 and find that next snippet:
generate next exception:
but if I include content of
extra/demo.html
directly into a page all works fine. We didn't see that issue on Angular Dart 0.12. Here is the source code:index.html:
index.dart:
extra/demo.html:
extra/demo.dart:
pubspec.yaml:
The text was updated successfully, but these errors were encountered: