You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
Create a controller, a router, a view, and a template
In the template, refer to a controller field (say, ctrl.foo)
Right click on the view (html) and select "View as JavaScript"
What is the expected output? What do you see instead?
Expect to see view + routed template rendered, saw "no getter" exception instead:
No getter for 'ctrl'.
STACKTRACE:
Error
at dart.wrapException (http://127.0.0.1:8080/sandbox2.dart.js:2489:15)
at StaticClosureMap.lookupGetter$1 (http://127.0.0.1:8080/sandbox2.dart.js:9126:17)
at DynamicParserBackend.newAccessScope$1 (http://127.0.0.1:8080/sandbox2.dart.js:7366:21)
at DynamicParserImpl.parseAccessOrCallScope$0 (http://127.0.0.1:8080/sandbox2.dart.js:7720:29)
at DynamicParserImpl.parsePrimary$0 (http://127.0.0.1:8080/sandbox2.dart.js:7696:21)
at DynamicParserImpl.parseAccessOrCallMember$0 (http://127.0.0.1:8080/sandbox2.dart.js:7653:21)
at DynamicParserImpl.parsePrefix$0 (http://127.0.0.1:8080/sandbox2.dart.js:7649:21)
at DynamicParserImpl.parseMultiplicative$0 (http://127.0.0.1:8080/sandbox2.dart.js:7628:21)
at DynamicParserImpl.parseAdditive$0 (http://127.0.0.1:8080/sandbox2.dart.js:7617:21)
at DynamicParserImpl.parseRelational$0 (http://127.0.0.1:8080/sandbox2.dart.js:7602:21)
However if I refer the model in the view file, this problem will go away. The following code snippets explain it in slightly more details:
Content of the view:
<!-- this block enables the ctrl.foo reference in the template --
<div ng-repeat="x in ctrl.foo">
{{ x }}
</div>
<ng-view></ng-view>
Using Angular.dart v12, i have run to some problems using controllers from parent view, specially if they have the same selector ('ctrl' in my case).
Try adding reference of your controller to the current view.
<div ng-repeat="x in ctrl.foo" my-ctrl>
{{ x }}
</div>
@ckyang74 The issue is linked to the discussion thread you've mentioned: templates for route are not automatically detected and should be added to your pubspec.yaml:
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Expect to see view + routed template rendered, saw "no getter" exception instead:
However if I refer the model in the view file, this problem will go away. The following code snippets explain it in slightly more details:
Content of the view:
Content of the routed template:
What version of the product are you using?
angular 0.10.0
On what operating system?
OS X 10.9.4
What browser (if applicable)?
Chrome
Please provide any additional information below.
The text was updated successfully, but these errors were encountered: