Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Synopsis:
This will allow the directory in which your angular templates live to contain jade and/or html and will compile (in the case of jade) and put them in the $templateCache.
This does work with the
@rack.assets
object if you have multiple assets and are usingassets.url(...)
in your jade templates.Need to add the example to the readme but the only notable bit is the need for a
templateCacheDirname
option for each AngularTemplatesAsset asset. The value of thetemplateCacheDirname
option is the dirname of thetemplateUrl
you will be using in your angular routing configuration or directives to reference the template file.Example:
This example will compile html and jade documents located on the filesystem in the
__dirname + '../widget/app/views'
directory, and embed them in JS file served by the server at'/js/widget/templates.js'
.NOTE: all files in the
templateUrl
should use the.html
file extension (including jade templates)Server
Project directory structure:
In your projects
assets.js
:Client
In an angular route config: