Saturday 15 March 2014

javascript - ng-repeat fails inside ng-view -


I have found a simple app that is using ng-view, with ng-repeat in it. First of all I was doing it without ng-scene, and it worked fine. Then I changed into NG-view, and NG-failed to repeat. Everything else worked out, only NG-Encore pulled out $ var and not real values. (Ajnaby still, if I click on the "menu" link, instead of changing pages, the output will produce another part of $ $.)

The signals from the answers given here I can not seem to leave the item down to the bottom of the root, I can not seem to work it, despite how I try it, the whole thing fails silently, so I also get the error message I am not What can not understand, I mean read the original fund, but some failed. I do not know.

I have set up a planker with the last attempt from the other, my current effort, instead of using a service, tries to make a different difference, but it does not work .

  app.controller ('VerbsController', ['$ rootScope', function ($ rootScope) {$ Rootscope.jverbs = [{id: 41, name: "fur", vClass: " Class I ", plainffr:" FURU ", plainfif:" one ?? μã ???? ", vKanji1:" ¸¸¸ ?? one, ????, a ???? ", vDef1:" falling , VType1: "vi", vKanji2: "æ ?? ¯¯ã" ???, vDef2: "class I", plain PRFR: "foot", "throw", "throw", "brick "," Vtype 2: "," vt "}, {id: 42, name:" foot ", vClass:" wave, shake, swing; plainfree: "one μ μ ¨ ¨ ¨", vKanji1: "å ¤ Vi ", vDef1:" To increase weight, fat became ", vType1:" vi "}, {ID: 43, Name:" Fuya You ", WeeClus:" Class I ", SadfFR:" Fuayu ", SideraPafek:" A ?? μã "???? ????", vKanji1: "A ¢ ?? a ??? ??? a ??" VDef1: "increase, increase", vType1: "vt"}];}]); App.controller ('MenuController', function ($ area, $ location) {$ scope.olist = function () {$ location .path ('/ list');};}); App.controller ('ListController', function ($ jarscope, $ radius, $ location) {$ scope.omenu = function () {$ location.path ('/ Menu ');};});   

It should be smaller than some anger that I just miss. If someone can help me find it, thank you in advance!

I rebuffed you and tried to fix it issue. There were many problems with you, which were very involved with the wrong case and the path paths were pointing to the partial folder that does not exist.

But it is believed that the main issue was that your ListController definition was incorrect, due to which the template rendering was failing.

It looks like before (in this case also there is a $ rootScope )

  app.controller ('ListController', function ($ jarscope) , $ Scope, $ location) {$ scope.omenu = function () {$ location.path ('/ menu');};});   

This is the correct way

  app.controller ('ListController', ['$ rootScope', '$ scope', '$ location', function ($ Rootscope, $ area, $ location) {$ scope.omenu = function () {$ location.path ('/ menu');}}}]);   

You see it in action here



No comments:

Post a Comment