我有这样一个需求:ChartController会生成变量,将数值赋给p的id,然后GraphController中用到p的id变量,但是GraphController中的方法需要p的id已被渲染才行。
如果GraphController的xx方法被调用的时候,我查看前端的代码,p的id名称还是
去除ng-controller="GraphController"后,发现p的id渲染正确
很奇怪!
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
ng-controller会开个新的scope