angularjs checkbox toggleselection on pagination not working?

I have 2 pages of users, so when I check 2 check-boxes on page 1 and uncheck one of them, the toggleSelection() method is called. But if I navigate to page 2 and comeback to page 1 again and uncheck the checkbox the toggle selection is not being called.

Here is my code:

 <table id="UserInfoTable" class="table table-hover table-bordered table-responsive">
                <thead>
                    <tr style="background-color:black;color:white;border:none!important">
                        <th style="border:none!important" ng-show="canInviteOrEdit">Select</th>

                    </tr>
                </thead>
                <tbody>
                    <tr data-ng-repeat="subscription in groupDetail.membership| startFrom:currentPage*pageSize | limitTo:pageSize" class="rowbottom-color" ng-class-odd="'odd'" ng-class-even="'even'" style="border:none!important">
                        <td ng-show="canInviteOrEdit" style="border:none!important">
                            <input id="{{subscription.MembershipId}}" type="checkbox" value="{{subscription.MembershipId}}" ng-model="chckedIndexs" ng-checked="chckedIndexs.indexOf(subscription.MembershipId) > -1" ng-change="checkedIndex(subscription.MembershipId)" />

                        </td>
                    </tr>
                </tbody>
            </table>
            <ul class="page-button text-center clearfix mbz" ng-show="groupDetail.membership.length > pageSize">
                <li data-ng-repeat="t in getPagination(groupDetail.membership)">
                    <span data-ng-class="{disabled: currentPage == $index}" data-ng-disabled="currentPage == $index" data-ng-click="getCurrentPage($index)">
                    </span>
                </li>
            </ul>

 $scope.chckedIndexs = [];

        $scope.checkedIndex = function (student) {
            if ($scope.chckedIndexs.indexOf(student) === -1) {
                $scope.chckedIndexs.push(student);
            }
            else {
                $scope.chckedIndexs.splice($scope.chckedIndexs.indexOf(student), 1);
            }
        }

   $scope.getCurrentPage = function (n) {
            $scope.currentPage = n;
        };

        $scope.getPagination = function (membership) {
            if (membership) {
                var numPages = Math.ceil(membership.length / $scope.pageSize);
                var pages = [];

                for (var i = 0; i < numPages; i++) {
                    pages[i] = i;
                }

                return pages;
            }
        };

read more

Argument [app.yaml] is not a valid deployable file google cloud error

I’m going through the hello world tutorial on how to deploy a nodejs app to google cloud. I downloaded the google cloud sdk. I finished all the steps until “Deploy the app to Google Cloud Platform”. When I got there, I entered the command they tell us to enter but got this error on the google cloud sdk shell “Argument [app.yaml] is not a valid deployable file” and ” Errors occurred while parsing the App Engine app configuration. I am in a different directory than where the app.yaml file is located. How do you change directories in the shell?

read more

How to populate the Drop Down List with the help of ViewBag()

I do not know what is wrong in my code. following are the code classes respectively, and getting the error ArgumentNullException :

I am using the DB first approach.

Here is my model class:

public partial class Employee
    {
        public int EmployeeID { get; set; }
        public Nullable<int> EmployeeTypeID { get; set; }
        public int DepartmentID { get; set; }
        public int GradeID { get; set; }

        public virtual ICollection<BillingLinkedPersonnel> BillingLinkedPersonnels { get; set; }
        public virtual Department Department { get; set; }
        public virtual EmployeeType EmployeeType { get; set; }
        public virtual ICollection<EmployeeDetail> EmployeeDetails { get; set; }
        public virtual ICollection<EmployeeEducationDetail> EmployeeEducationDetails { get; set; }
        public virtual ICollection<EmployeeLeave> EmployeeLeaves { get; set; }
        public virtual Grade Grade { get; set; }
    }

read more

How to populate the Drop Down List with the help of ViewBag()

I do not know what is wrong in my code. following are the code classes respectively, and getting the error ArgumentNullException :

I am using the DB first approach.

Here is my model class:

public partial class Employee
    {
        public int EmployeeID { get; set; }
        public Nullable<int> EmployeeTypeID { get; set; }
        public int DepartmentID { get; set; }
        public int GradeID { get; set; }

        public virtual ICollection<BillingLinkedPersonnel> BillingLinkedPersonnels { get; set; }
        public virtual Department Department { get; set; }
        public virtual EmployeeType EmployeeType { get; set; }
        public virtual ICollection<EmployeeDetail> EmployeeDetails { get; set; }
        public virtual ICollection<EmployeeEducationDetail> EmployeeEducationDetails { get; set; }
        public virtual ICollection<EmployeeLeave> EmployeeLeaves { get; set; }
        public virtual Grade Grade { get; set; }
    }

read more