You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.
I'm rendering content of the editor using $http service. But onLoad function is being called much before data is rendered in editor.
When I'm adding code inside $timeout service then it is working properly. Is there any way to achieve this without using $timeout service.
funciton onLoad(editor) {
/*
It will set the some of the lines readyonly. But because onLoad is executing much
before data is rendered from $http service, it does not find any lines.
*/
set_readonly_lines(editor);
}
funciton onLoad(editor) {
/*
Using timeout it is working properly
*/
$timeout(function() {
set_readonly_lines(editor);
}, 1);
}
The text was updated successfully, but these errors were encountered:
$scope.openFile=function(file){//Here I prefer use factory.//fileFactory.openFile(file).then(fn,fn);$http.post('/api',file).then(function(res){$scope.onOpen(res.data.content,res.data.extension)},angular.noop);}
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm rendering content of the editor using $http service. But onLoad function is being called much before data is rendered in editor.
When I'm adding code inside
$timeout
service then it is working properly. Is there any way to achieve this without using $timeout service.The text was updated successfully, but these errors were encountered: