angularjs - $observe an object attribute of a directive -


There is a separate scope of my instruction and it receives an object from an attached controller as an attachment.

  App Directional ('Description', function () {return {restricted: 'e', ​​radius: {device: '= device', ...}, templateUrl: '/ details .html ', link: function scope, element, attrs) {attrs. $ Inspection ('device', function (value) {...});}};});  

and in HTML:

  & lt; Details Tool = 'ctrlAlias.device' ... & gt;  

I have read somewhere that if I want to check the change in the attribute, then I have to use the $ Inspection function. However, in most instances, I had only seen the use of $ inspection on primitive values ​​

I wonder if I can convert $ to device < How to show a property of / code>, device.exist (a boolean) and < attrs. Use device.id (a string) in $ ?

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -