So I'm just starting out with AngularJS and I've got two scopes defined in a controller. In the view I want to have a sort of lookup to the second scope. How's that done?
needs to be replaced with {{ notes.installation }} where notes.id = servers.install_id
I hope it makes sense?
JavaScriptjQuery
Last Comment
MrChrisDavids
8/22/2022 - Mon
Kyle Hamilton
not sure how you can have two scopes in one controller. a controller has one scope - that's kind of a basic premise of angular. there are situations where you might end up with some nested scopes within your app, but you would never "define" two scopes in the controller
it's not clear what you are trying to acheive.
can you explain on a higher level what the requirement is, and/or, provide a plunker or jsfiddle with the code in question
Indeed it's two variables in a scope - nothing else. Sorry about the mixup there.
I have a dynamic list of servers shown as panels on a view. There are some details on these servers that are common for certain sets and those are the ones that I'd like to render on the view
The details are however accessed from another datasource and the only matches are some IDs from the servers panel that can be matched if they're valid for detail_x kind of.
Let's say, for instance - 20 servers are used for application XYZ which is identified by ID 1. All servers come in with a variable servers.app_id = 1 and I'd then like to write out "XYZ" on the panel instead of the ID.
There's plenty of different IDs that would be replaced, not just the app and notes.
I'll have a look at a directive - see if I can get that working. Thanks!
it's not clear what you are trying to acheive.
can you explain on a higher level what the requirement is, and/or, provide a plunker or jsfiddle with the code in question