lookfirst/generator-systemjs

TodoCtrl executes twice.

dviramontes opened this issue · 2 comments

Hi do you have any ideas as to why the
body of src/app/todo/controllers/todoCtrl.js
would execute twice ?

thanks!

Found the error in src/app/todo/todo.tpl.html:1

It looks like the $stateProvider in
src/app/todo/todoModule.js:13
already binds the controller
and the view binds it again.

so i removed the ng-controller="TodoCtrl"attribute
from todo.tpl.html and it fixed the problem.

just fyi in case anyone else runs into this

closing

Thanks. Fixed