Open ghost opened 8 years ago
You want to be sure that the text angular files are loaded in the right order for it to work. Change your module definition to this:
{
name: 'textAngular',
serie: true,
files: [
'lib/textangular/dist/textangular.css',
'https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css',
//'lib/angular-sanitize/angular-sanitize.min.js',
'lib/textangular/dist/textangular-rangy.min.js',
'lib/textangular/dist/textangular-sanitize.min.js',
'lib/textangular/dist/textangular.min.js'
]
}
Notice the serie: true
parameter that I added here.
Unfortunately it is not working with 'serie: true', also ModalService has its own controller and view but no matching state definition.
Here is the module definition that I use in my own app to load text-angular:
{
name: 'text-angular',
files: [
'vendor/js/textAngular-sanitize.min.js',
'vendor/js/rangy-core.min.js',
'vendor/js/rangy-selectionsaverestore.min.js',
'vendor/js/textAngular.js',
'vendor/js/textAngularSetup.js',
'vendor/css/textAngular.css'
],
serie: true
}
I have a 20 second delay when click to navigate to this state is it because of ocLazyLoad? I mean is browser's script caching is disabled by using ocLazyLoad?
It is not disabled unless you use cache: false
, but with serie: true
it waits for each file to be loaded before it loads the next one.
@ocombe: That's some serious magic there. I've literally spent all day tweaking things, trying to get text-angular working. Thank you!
I use Angular Modal Service That I load inside of a controller, in the modal I have a textAngular box and I use a minification tool that compresses my scripts in to an app.js file inside wwwroot folder. I use this code for ocLazyLoad:
Although the box renders as HTML editor and Html look correct, but Buttons of textAngular are small without text.