-
Notifications
You must be signed in to change notification settings - Fork 167
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
fixed bug on cordova accessing template via $http on local file:// ,issues with .then().catch(), $templateCache fixes. #108
Conversation
+ fixed bug on cordova accessing template via $http on local file:// +updated dependencies
substituted with proper .then with callbacks
Now we can call Notification({message:'message here!',type:'success'}), along with old synthax Notification('message here!','success');
fixing custom template loading
done to have same tag for 0.3.3 version with angular 1.5.9 or above dependency.
Good job! |
@@ -145,7 +160,7 @@ angular.module('ui-notification').provider('Notification', function() { | |||
|
|||
setCssTransitions('none'); | |||
|
|||
angular.element(document.querySelector(args.container)).append(templateElement); | |||
angular.element(document.getElementsByTagName('body')).append(templateElement); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this now using the body?
What if I want to use the notification inside a modal? I prefer the flexibility of providing my own selector.
And just FYI, you can get the body using document.body
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for insight, but I havent changed this line by myself. What i've done is dealing with Template loading. I'll just fix it as you've adviced. Thank you.
UPD: Fixed.
LGTM. I've verified this fixes the issue. Would love to have this merged! @MikhailRoot Thank you for the solution! |
we really don't need to load default template via $http service - now using $templateCache directly as we preload it in our module.