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

onLoad doesn't work as expected, like other configuration options #94

Open
quietlyconfident opened this issue Feb 4, 2015 · 0 comments

Comments

@quietlyconfident
Copy link

Depending on which documentation you look at, onLoad looks like any other configuration option. But it only works when called in a very specific way which makes it different than other configuration options, and more difficult to use.

In the documentation here: http://angular-ui.github.io/ui-codemirror/ , It looks like you can set ui-codemirror to be equal to a JSON string representation of a configuration hash.

And, in the documentation here: https://github.com/angular-ui/ui-codemirror , it looks like one of the options in that hash can be onLoad ; and also that instead of setting it in the markup you can set it in the opts.

However, at least in my experience so far, you can't set 'onLoad':'someScopeFunc' in the configuration-opts hash, it is ignored. And, you can't pass ui-codemirror="{'onLoad':'someScopeFunc'}" in the markup, the quotes mess it up.

In my view, onLoad should be made to work like any other configuration option, in the -opts hash, and should function when specified as valid JSON (e.g. with quotes around the key and value).

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

1 participant