Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficult to Access Optimizely Data Object #4

Open
alexjohnson505 opened this issue Jul 30, 2015 · 1 comment
Open

Difficult to Access Optimizely Data Object #4

alexjohnson505 opened this issue Jul 30, 2015 · 1 comment

Comments

@alexjohnson505
Copy link

As per the Optimizely JS API users may sometimes wish to access the Optimizely Data Object.

data-object

This object can be tricky to load within Angular's scope. I'm currently able to load the object from the callback on loadProject

promise = optimizely.loadProject(id);
promise.then(function(resp){
   var projectSettings = resp;
});

While it's possible to do manually, it might be nice to have method on this directive for returning the current project's data object? If the project isn't loaded yet, it could return a promise. For example:

optimizely.projectSettings();

// or

promise = optimizely.projectSettings();
promise.then(function(resp){
   var projectSettings = resp;
})

Thanks for creating ng-optimizely!

@jacopotarantino
Copy link
Owner

This sounds pretty do-able. Would you care to submit a pull request with your proposed changes and relevant documentation? I can take it on myself but it might be a little bit before I can start the work.

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

No branches or pull requests

2 participants