angularjs - isolate scope within directive doesn't behave as expected -


i'm creating test directive can seen here:

http://jsbin.com/xosusozipufe/1/

this isn't behaving expected. thought h4 within directive div read 'within app hello world' on load , end change buttons clicked. html nested within directive div doesn't inherit isolate scope of directive, correct?

any thoughts appreciated

c

  • @ isolated scope 1 way , works in up-down fashion means whatever pass go string can not update scope of directive.
  • either should use transclude or put html of directive inside template/templateurl option.
  • if want update directive scope either can use "=" isolated scope or can pass function "&" isolated scope.

jsbin demo


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -