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

Angular 1.6 compatibility #377

Closed
niharikasah opened this issue Jan 24, 2017 · 1 comment
Closed

Angular 1.6 compatibility #377

niharikasah opened this issue Jan 24, 2017 · 1 comment

Comments

@niharikasah
Copy link

The issue is with templates loader function. The success and error callback is removed with angular 1.6. Rather it has then() and catch().

$http.get(url, params).success(function (data) {
if (angular.isString(data) && data.length > 0) {
angular.forEach(angular.element(data), function (node) {
if (node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') {
$templateCache.put(node.id, node.innerHTML);
}
});
}
if (angular.isUndefined(filesCache.get(url))) {
filesCache.put(url, true);
}
deferred.resolve();
}).error(function (err) {
deferred.reject(new Error('Unable to load template file "' + url + '": ' + err));
});

@alexan
Copy link
Contributor

alexan commented Feb 1, 2017

created a pull request for this
#380

@ocombe ocombe closed this as completed in 17d372f Feb 1, 2017
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