Closed okosowski closed 7 years ago
Yes, in Angular 1.6 the $http Success/Error
callback methods have been deprecated.
They should be replaced by .then(...)
everywhere in this library.
Besides this change (.then()
)
line 56
$http.get(args.template,{cache: $templateCache}).then(function(template) {
line 189
}, function(data){
I'm also facing some issues related to jqLite
when usin .bind()
. Around this line:
line 126
if (args.closeOnClick) {
templateElement.addClass('clickable');
templateElement.bind('click', closeEvent);
}
https://github.com/MikhailRoot/angular-ui-notification working with angular 1.6 also I've added direct templateCache loading if we load default template which is present in ui-notification module. I've submited edits As PR
As @cklemming says, in Angular 1.6 $http Success/Error
callback methods have been deprecated.
$http's deprecated custom callback methods -
success()
anderror()
- have been removed (...) but note that the method signatures and return values are different.Due to b54a39
You should find more info in about changes with $http in migration guide.
@alexcrack Any chance @MikhailRoot 's solution will be merged? It would be great to have this callbacks deprecation fixed soon as many angular projects are broken after upgrading to angular 1.5.9+
Hi ! i've updated bower.json to resolve properly for angular 1.5.x and 1.6 of package so untill our PR will be merged to master you can specify fork with fixes in your bower.json file with this line:
"angular-ui-notification": "MikhailRoot/angular-ui-notification#0.3.4",
in your dependencies
section.
Great! Thank you @MikhailRoot
@MikhailRoot Do you not get the "Template (http://**path**.html) could not be loaded. TypeError: element.addEventListener is not a function" error?
@interruptr this exception is Thrown in code just like in previous versions, if Notification service can't access template neither from templateCache nor from $http. Also what do you mean by http://path.html
as path to your template. There are some points to consider:
/templates/yourtemplate.html
/partials/templatename.html
), but much better - use templateCache with preloaded templates - with this approach you'll overcome a lot of troubles with relative paths of your app and templates. @MikhailRoot I require it with webpack and insert the template into template cache (not a cordova app). I found a workaround for this - if I add a template into templateCache with the name of the default template ("angular-ui-notification.html") then it works. Otherwise the error described above gets thrown... It's quite interesting. I will look into the issue a bit later.
@interruptr Thank you for investigation and insight, i've updated code to check templateCache first both default and custom specified template names. Latest fixes with update in bower.json
"angular-ui-notification": "MikhailRoot/angular-ui-notification#0.3.5"
then bower update
I've submitted #109 just in the case @alexcrack is in a hurry and can't find the time to give the deserved attention to @MikhailRoot 's #108
Please fix this asap...
@bhaveshvyas007 as i mentioned above untill fixed or merged use
"angular-ui-notification": "MikhailRoot/angular-ui-notification#0.3.5"
in your bower.json then update. works with angular 1.6
@MikhailRoot guess that we need to use your branch for now
Merged @MikhailRoot's pull-request.
with angular
v1.6.0-rc.0
, any use Notification throw