Comments (6)
Some example to illustrate what you're saying would be swell!!
from angular.
My HTML
<select ng-model="selected" ng-option="color.name for color in colors"></select>
My Controller
$scope.colors = [
{name:'black', shade:'dark'},
{name:'white', shade:'light'},
{name:'red', shade:'dark'},
{name:'blue', shade:'dark'},
{name:'yellow', shade:'light'}
];
//next line is how it works
$scope.selected = $scope.colors[2];
//next line is how I really need it to work
$scope.selected = {name:'red', shade:'dark'};
I've been searching everywhere in the API. If there is a method and I haven't found it please put an example in the API. On other sites I could only find workarounds.
Thank you.
from angular.
So, you want to "COPY" the selected object?
from angular.
Well... first of all I am copying the object to my database. Now I'm trying to edit it so I need to compare both objects.
from angular.
This is the wrong repo. I think you may want to start on StackOverflow first or AngularJS repo.
from angular.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
from angular.
Related Issues (20)
- Best Practice for Base Component or Abstract Component HOT 3
- Multi-Project File Structure, Library suggestion for CSS and Assets HOT 3
- ngComponentOutlet HOT 2
- Custom events with outputs HOT 1
- Export ChangeDetectionScheduler and ChangeDetectionSchedulerImpl HOT 4
- NoopZone implementation: make onMicrotaskEmpty() and onStable() emit in the next microtask HOT 7
- inject() does not work when using an InjectionToken to avoid circular imports HOT 1
- Broken link to :host-context documentation HOT 2
- Angular Universal 17.1.1 Express REST API not working HOT 1
- preserveWhitespaces attribute doesn't work HOT 2
- https://angular.dev/tutorials/first-app/inputs BAD LINK HOT 1
- Link not working HOT 1
- Repetition of Sentence in Documentation HOT 3
- Angular UI didn’t pickup data model change when the project has BrowserAnimationsModule HOT 3
- Incorrect Link in Angular Documentation for :host-context Pseudo Class - Update Required HOT 4
- AbortController error with walletconnect lib after zone.js 0.14.3 update HOT 4
- Page not found. HOT 1
- Angular 15.2.10 sudden build failure (Subsequent variable declarations must have the same type. Variable 'crypto' must be of type 'Crypto', but here has type 'Crypto') HOT 1
- angular ssr GCP function not working HOT 3
- Brand new app failing with: NG0203: inject() must be called from an injection context such as a constructor HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.