mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Update AngularJS to 1.5
This commit is contained in:
@@ -62,6 +62,10 @@ angular.module('http-auth-interceptor', [])
|
||||
*/
|
||||
.config(['$httpProvider', 'authServiceProvider', <any>function ($httpProvider: ng.IHttpProvider, authServiceProvider: any) {
|
||||
|
||||
$httpProvider.defaults.headers.common = {'Authorization': 'Bearer token'};
|
||||
$httpProvider.defaults.headers.get['Authorization'] = 'Bearer token';
|
||||
$httpProvider.defaults.headers.post['Authorization'] = function (config:ng.IRequestConfig):string { return 'Bearer token'; }
|
||||
|
||||
var interceptor = ['$rootScope', '$q', <any>function ($rootScope: ng.IScope, $q: ng.IQService) {
|
||||
function success(response: ng.IHttpPromiseCallbackArg<any>) {
|
||||
return response;
|
||||
@@ -510,6 +514,7 @@ test_IAttributes({
|
||||
$normalize: function (classVal){ return "foo" },
|
||||
$addClass: function (classVal){},
|
||||
$removeClass: function(classVal){},
|
||||
$updateClass: function(newClass, oldClass){},
|
||||
$set: function(key, value){},
|
||||
$observe: function(name: any, fn: any){
|
||||
return fn;
|
||||
@@ -748,6 +753,7 @@ angular.module('docsTransclusionExample', [])
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
angular.module('docsIsoFnBindExample', [])
|
||||
.controller('Controller', ['$scope', '$timeout', function($scope: any, $timeout: any) {
|
||||
$scope.name = 'Tobias';
|
||||
@@ -847,6 +853,30 @@ angular.module('docsTabsExample', [])
|
||||
};
|
||||
});
|
||||
|
||||
angular.module('componentExample', [])
|
||||
.component('counter', {
|
||||
require: ['^ctrl'],
|
||||
bindings: {
|
||||
count: '='
|
||||
},
|
||||
controller: 'CounterCtrl',
|
||||
controllerAs: 'counterCtrl',
|
||||
template: function () {
|
||||
return '';
|
||||
},
|
||||
transclude: {
|
||||
'el': 'target'
|
||||
}
|
||||
})
|
||||
.component('anotherCounter', {
|
||||
controller: function(){},
|
||||
require: {
|
||||
'parent': '^parentCtrl'
|
||||
},
|
||||
template: '',
|
||||
transclude: true
|
||||
});
|
||||
|
||||
interface copyExampleUser {
|
||||
name?: string;
|
||||
email?: string;
|
||||
|
||||
Reference in New Issue
Block a user