Skip to content
This repository has been archived by the owner on May 25, 2019. It is now read-only.

Can't see directive's scope when embedded in a custom directive #114

Open
jrwilliams opened this issue Oct 16, 2015 · 1 comment
Open

Can't see directive's scope when embedded in a custom directive #114

jrwilliams opened this issue Oct 16, 2015 · 1 comment

Comments

@jrwilliams
Copy link

I'd like to use a ui-codemirror directive inside my own custom directive, but it appears that it cannot see the directive's scope - I'm trying to define the options for the codemirror block.

Plnkr here: http://plnkr.co/edit/QdJoF8WxW3r4bzXEYfNe?p=preview Notice that the first codemirror block doesn't have line numbers because it can't see the options2 object defined on the directive's scope.

Is this a bug? Maybe I'm misusing/misunderstanding directive scoping?

@rohullah-ayoub
Copy link

I think the problem here is that codemirror directive inside your custom directive is not being compiled. This can be solved by using the compile function inside your directive.

Modified example of your code here: http://plnkr.co/edit/UzWIA4IHdx2r4MYTDV5D?p=preview

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants