0

I use the UI Router module in Angular (1). Typically it would look like

myApp.config(function($stateProvider) {
  var helloState = {
    name: 'hello',
    url: '/hello',
    templateUrl: 'http://www.example.com/partials/helloWorld'
  }
}

Is it possible to reload this partial template forcefully during development where the source code keeps changing? Data changes can be mapped using two-way binding but that is not my scenario? I saw some answers related to the latter case. Is there something like $state.reload('state') kind of functionality?

Is there a better way to test a partial from a development perspective?

Nishant
  • 20,354
  • 18
  • 69
  • 101
  • `$state.reload()` will reload your existing state. – Prerak Sola Sep 29 '17 at 15:01
  • @PrerakSola Argument has to be supplied right? I am new to Angular. How does it know which is the "state" that has to be loaded? Do you mean the `$state` is the object referring to the exact context? – Nishant Sep 29 '17 at 15:15
  • 1
    Here is the documentation for it: https://github.com/angular-ui/ui-router/wiki/Quick-Reference#statereload – Prerak Sola Sep 29 '17 at 15:16

0 Answers0