How can I add ui-router stateProvider configuration to my application with Typescript?

后端 未结 3 860
温柔的废话
温柔的废话 2021-02-15 13:12

Before when not using Typescript I was adding my ui-router state information like this:

app.config([
    \'$httpProvider\',
    \'$locationProvider\',
    \'$sce         


        
3条回答
  •  南笙
    南笙 (楼主)
    2021-02-15 13:35

    You wouldn't gain an advantage from using a class here because you don't need to use this or add properties to it in the config function. Just use a function like its JavaScript (TypeScript won't complain).

提交回复
热议问题