javascript - Angularjs: Get $routeprovider template from function -


i've been reading important parts of docs , found page: https://docs.angularjs.org/api/ngroute/provider/$routeprovider

somewhere in there, says route>template property can either (string|function).
guess should function returns html formed-string. want know if possible use http request html server , how write such code.

i know make angular request partial on each navigation, should counter productive - have reasons.

i guess should function returns html formed-string.

right, like:

templateurl: function(param) {    return 'views/' + param.details + '.html' ; } 

what want know if possible use http request html server

no, cannot that.

the config loads first , cannot inject $http config


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -