2
votes

I have file

reg.html

<label>Name:</label>

in require.config :

requirejs.config({

 paths: {
 reg:"/templates/reg.html"
}

})

When i try load template :

define('ng_start',["angular","jquery","reg"],function(An,$,template){
....
})

GET /templates/registry.html.js?bust=1417489939824228.12310815788805 require.js:166 Uncaught Error: Script error for: registry http://requirejs.org/docs/errors.html#scripterror

How deleted js extension from registry.html.js ?

1

1 Answers

4
votes

You need to state that your "reg" module is to be loaded as text and not as a JavaScript module. See the following for details:

https://github.com/requirejs/text

Your specific code should read:

define('ng_start',["angular","jquery","text!reg"],function(An,$,template){
....
})

note: the addition of text! in the module definition requirements for reg.