How do I reload an Angular partial for testing purpose?

落爺英雄遲暮 提交于 2019-12-11 17:32:58

问题


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?

来源:https://stackoverflow.com/questions/46490256/how-do-i-reload-an-angular-partial-for-testing-purpose

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!