Angularjs   发布时间:2022-04-20  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了AngularJS ui-router是否有任何Typescript定义?大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用带有ui-router的打字稿.有没有人为此找到任何打字稿定义.我看着肯定打字,什么也看不见.这是我想要找到的接口文件
$stateProvider
我们正在使用这个d.ts用于ui-router:

更新的链接,2015年5月

https://github.com/borisyankov/DefinitelyTyped/blob/master/angular-ui-router/angular-ui-router.d.ts

原始版本(准备复制/粘贴)

https://raw.githubusercontent.com/borisyankov/DefinitelyTyped/master/angular-ui-router/angular-ui-router.d.ts

升级说明:

当我将angular-ui-router.d.ts更新到最新版(2015年5月)时,我也遇到了很少的构建问题.解决方案简而言之就是

通过这几个步骤…所有应该再次工作
(original,不工作链接)

资源的小代码片段形式:

// Type deFinitions for Angular JS 1.1.5+ (ui.router modulE)
// Project: https://github.com/angular-ui/ui-router
// DeFinitions by: MicHel Salib <https://github.com/micHelsalib>
// DeFinitions: https://github.com/borisyankov/DefinitelyTyped

/// <reference path="../angularjs/angular.d.ts" />

declare module ng.ui {

    interface IState {
    ...

使用示例

@H_601_1@module Mymodule { export class MyStateConfig { constructor(private $stateProvider: ng.ui.IStateProvider,private $urlRouterProvider: ng.ui.IUrlRouterProvider ...) { this.$stateProvider.state(...

大佬总结

以上是大佬教程为你收集整理的AngularJS ui-router是否有任何Typescript定义?全部内容,希望文章能够帮你解决AngularJS ui-router是否有任何Typescript定义?所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。