为了账号安全,请及时绑定邮箱和手机立即绑定

未注册具有此名称的 AngularJS 错误控制器

未注册具有此名称的 AngularJS 错误控制器

眼眸繁星 2021-09-11 18:28:14
我对这个很头疼,我在 Angular 方面不是很熟练,但这是检查“今天的美元价值”的唯一方法。这是我的 dolar.jsvar app = angular.module("app", []);app.controller("DolarCtrl", function($scope, $http) {    $scope.dailyIndicators = '';    $http.get('https://mindicador.cl/api/dolar').then(function(res) {  //.success was changed for .then //         $scope.dailyIndicators = res.data.serie[0].valor;    })});基本文件    <body ng-app>    <p ng-controller="DolarCtrl"> Dolar acutal: $ {{DolarCtrl.dailyIndicators}}</p></body>但是在我刷新页面时,我收到了这个错误: error: [$controller:ctrlreg]http://errors.angularjs.org/1.7.5/$controller/ctrlreg?p0=DolarCtrl       at angular.js:99       at angular.js:11646       at ga (angular.js:10677)       at q (angular.js:10462)       at g (angular.js:9801)       at g (angular.js:9804)       at angular.js:9666       at angular.js:1947       at m.$eval (angular.js:19356)       at m.$apply (angular.js:19455)有任何想法吗?我不知道你们是否需要更多信息。
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 167 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信