@DarcOde

Где тут ошибка?

var app = angular.module("myApp", []);
    app.controller("myCtrl", function ($scope, $http, $filter) {
        $scope.filterDay = false;
        $scope.filteredDay = 0;
        $scope.showFilter = false;
            $http.get("../wp-content/start-sql.php")
                .then(function (response) {
                    $scope.startData = JSON.parse(response.data.records);
                    $http.get("../wp-content/timetable-sql.php", {
                        params: {
                            class: $scope.selectedClass, time: $scope.selectedTime,
                            tutor: $scope.selectedTutor, location: $scope.selectedLocation, type: $scope.selectedType
                        }
                    })
                        .then(function (response) {
                            $scope.timetableData = JSON.parse(response.data.records);
                        });
                });
            $http.get("../wp-content/timetable-sql.php", {
                params: {
                    class: $scope.selectedClass, time: $scope.selectedTime,
                    tutor: $scope.selectedTutor, location: $scope.selectedLocation, type: $scope.selectedType
                }
            })
                .then(function (response) {
                    $scope.timetableData = JSON.parse(response.data.records);
                    $scope.mondayList = {
                        "list": $filter('filter')($scope.timetableData, {day_id: 1}),
                        "name": "Понедельник",
                        "title": "mondayList",
                        "day_id": 1
                    };
                    $scope.tuesdayList = {
                        "list": $filter('filter')($scope.timetableData, {day_id: 2}),
                        "name": "Вторник",
                        "title": "tuesdayList",
                        "day_id": 2
                    };
                    $scope.wednesdayList = {
                        "list": $filter('filter')($scope.timetableData, {day_id: 3}),
                        "name": "Среда",
                        "title": "wednesdayList",
                        "day_id": 3
                    };
                    $scope.thursdayList = {
                        "list": $filter('filter')($scope.timetableData, {day_id: 4}),
                        "name": "Четверг",
                        "title": "thursdayList",
                        "day_id": 4
                    };
                    $scope.fridayList = {
                        "list": $filter('filter')($scope.timetableData, {day_id: 5}),
                        "name": "Пятница",
                        "title": "fridayList",
                        "day_id": 5
                    };
                    $scope.saturdayList = {
                        "list": $filter('filter')($scope.timetableData, {day_id: 6}),
                        "name": "Суббота",
                        "title": "saturdayList",
                        "day_id": 6
                    };
                    $scope.sundayList = {
                        "list": $filter('filter')($scope.timetableData, {day_id: 7}),
                        "name": "Воскресенье",
                        "title": "sundayList",
                        "day_id": 7
                    };
                    $scope.week = {
                        "mondayList": $scope.mondayList,
                        "tuesdayList": $scope.tuesdayList,
                        "wednesdayList": $scope.wednesdayList,
                        "thursdayList": $scope.thursdayList,
                        "fridayList": $scope.fridayList,
                        "saturdayList": $scope.saturdayList,
                        "sundayList": $scope.sundayList
                    };
                });

    });


Вот код, ошибку выдает : Uncaught SyntaxError: Unexpected token <. Помогите решить
  • Вопрос задан
  • 39 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы