mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-18 12:33:17 +08:00
add angular-ui-router-uib-modal definition and test
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/// <reference path="./angular-ui-router-uib-modal.d.ts" />
|
||||
|
||||
angular.module("test", [
|
||||
"ui.bootstrap",
|
||||
"ui.router",
|
||||
"ui.router.default"
|
||||
])
|
||||
.config(function($stateProvider: angular.ui.IStateProvider) {
|
||||
$stateProvider
|
||||
.state('contacts', {
|
||||
// no modal
|
||||
resolve: {
|
||||
a: function() {
|
||||
return "a";
|
||||
},
|
||||
b: function() {
|
||||
return ["a", "b"];
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('contacts.contact', {
|
||||
// boolean modal
|
||||
modal: true
|
||||
})
|
||||
.state('contacts.contact.edit', {
|
||||
// string[] modal
|
||||
modal: ["a", "b"]
|
||||
})
|
||||
;
|
||||
});
|
||||
12
angular-ui-router-uib-modal/angular-ui-router-uib-modal.d.ts
vendored
Normal file
12
angular-ui-router-uib-modal/angular-ui-router-uib-modal.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
// Type definitions for angular-ui-uib-modal 0.11+ (ui.router module)
|
||||
// Project: https://github.com/nonplus/angular-ui-router-uib-modal
|
||||
// Definitions by: Stepan Riha <https://github.com/nonplus>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angular-ui-router/angular-ui-router.d.ts" />
|
||||
|
||||
declare namespace angular.ui {
|
||||
interface IState {
|
||||
modal?: boolean | string[];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user