- // ERROR (Console)
- First Time I Switch The Select Box, I get my object...
- Object {id: 1, creator_id: 1, name: "Dare, Auer and Grady", address: "0324 Spencer Harbors Suite 873", city: "Bartonfort"…}
- Next Time I switch the selectbox, I get...
- TypeError: object is not a function
- //HTML
- <select ng-options="selectedOffice as selectedOffice.id for selectedOffice in offices track by selectedOffice.id | orderBy: 'id'" ng-model="selectedOffice" ng-change="editOffice()"></select>
- // JS
- $scope.editOffice = function()
- {
- console.log($scope.selectedOffice);
- $scope.editOffice = angular.copy($scope.selectedOffice);
- }
SHARE
TWEET
Untitled
a guest
Dec 15th, 2014
5
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

