خرید بک لینک

Vote count: 0

I have the following Angular declarations, and get no complaints about JS syntax errors or anything like that:

App.js:

(function () {
    'use strict';

    var hookPointApp = angular.module("hookPointApp", []);
    hookPointApp.controller("agentCtrl", function ($scope, $http) {
        $scope.model = {};
        ...
    });
})();

suburbsCtrl:

(function () {
    'use strict';

    angular.module("hookPointApp").controller('suburbsCtrl', function ($scope, $http) {
        ...
        // TODO Get a proper provinceId somehow.
        $scope.areas.getOptions(1);
        ...
    });
})();

Then I have a repeater with options declared like:

<select class="form-control" ng-model="areas.areaId" ng-change="getOptions()">
    <option> - Select an Area - </option>
    <option ng-repeat="item in areas.options" ng-value="{{item.Id}}">{{item.Label}}</option>
</select>

Yet getOptions isn't called when I change the select option, and breakpoints I put in the Chrome debugger, even on lines not in functions, execution doesn't stop there, e.g. $scope.areas.getOptions(1); which is for initializing a dropdown, is not in a function, but below the function declaration, so I want to declare the function then call it immediately afterwards. A breakpoint in the module file, on var hookPointApp = angular.module("hookPointApp", []); doesn't even work, yet some Angular functionality in the app still sometimes works.

What could I be doing wrong?

asked 38 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 3 خرداد 1395 ساعت: 12:01

صفحه بندی