I am currently exploring the world of AngularJs and attempting to display options from a json file. However, I keep encountering the following error message:
"Error: [$controller:ctrlreg]"
Below is the code snippet I am working with:
var sj = angular.module("factApp", []);
(function(app){
"use strict";
app.controller('appController', function ($scope, $http){
$http.get('values.json').success(function (datos){
$scope.datos = data;
});
});
});
{
"orders": {
"odc": [
{
"id": "ABA",
"coupons": [
"1XY",
"2XY",
"3XY"
]
}
]
}
}
<!DOCTYPE html>
<html lang="en>
<div class="row" ng-app="factApp" ng-controller="appController">
<h1>Cupones</h1>
<ul>
<li ng-repeat="data in datos">
<p>Orden: {{data.id}}</p><br>
<p>Cupones {{data.coupons}}</p>
</li>
</ul>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<script src="testjson/fuctury.js"></script>
Could you please help me identify what I am doing wrong in my code? Any assistance would be greatly appreciated. Thank you in advance.