-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML Templates instead of inline html in JS #165
Comments
There are two main reasons in F2 version 1 that all of the html is in the
There's definitely a need to have first-class support for templates and as such I've gone ahead and labeled this question "v2" so we can look how to best support templates in F2 version 2. The cross-domain issue could likely be resolved by developers using an AMD optimizer (like r.js) along with a plugin like text! which will inline any templates into an AMD module. |
Thanks for the reply. I agree with the CORS point but url can contain the relative path so its in same folder as application. In terms of template it can be basics html also for initial stages. My main concern was if the html(basic structure) is quite big for large scale application and which is already in place then to write it again as per considering all the proper indentation or enclosing it in quotes properly can lead to lots of rework. Waiting eagerly for V2. |
There's also the possibility of having a dynamically generated manifest file. I'm not sure what server-side language you're using, but there are some examples in PHP or C# that demonstrate dynamically generating the html rather than having it hard-coded. Many of the apps in existence today follow this route. That said, there has been feedback against having dynamically generated manifests so having better support for static manifest files is a must. Keep an eye out to the Issues and v2 branch if you're curious on the progress of v2. |
hi we are using openf2 with multiple financial apps, it is around 35 apps., we use javascript framework, |
As of now we have to define all the html in the manifest.js (can you explain if possible why this implementation was favored)
Is there any other way like creating html templates and referring them the way we refer css/js i.e. by specifying the url like this
I think it will separate out the structure and will help in modularity.
The text was updated successfully, but these errors were encountered: