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


Before I was using the typecript, I was adding information to my Yuri-Router in this way: App.config ('$ httpProvider', '$ locationProvider', '$ sceProvider', '$ state provider', appconfig]); function appconfig ($ httpProvider, $ locationProvider , $ SceProvider, $ state provider) {$ locationProvider.html5Mode (true); $ SceProvider.enabled (incorrect); var admin = {name: 'admin', url: '/ admin', view: {...}} ;

Now I am using TypeScript I think that I How do I add a class to my app? I already have this code where I added a controller:

  var app = angular.module ('app') ', []). Controller (' App Controller ', app controller);  

I tried to add state information as .config but it appears that only the function As the argument.

Can anyone tell me that I How can I add my state's information to the Yuri-Router in the app?

You will not get the benefit from using a class here because you have this No need to use or add properties to it in the config function. Just use a function such as its javascript (typescript will not complain).


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -