sohoffice / angular-universalize-email Goto Github PK
View Code? Open in Web Editor NEWangular-universalize-email is a small utility that allows an angular project to generate email templates using angular universal.
angular-universalize-email is a small utility that allows an angular project to generate email templates using angular universal.
Images with a local file source do not render. What is the procedure to incorporate local images into the web page? They render fine when using standard SSR. For example, I would want to load an image from, say. ~assets/img/test-img.png
. I've also tried replacing the tilde with a forward slash, which, again, works in SSR but not the email generation.
At times, Angular is producing empty style tag. Something similar to the below.
<style ng-transition="serverApp"></style>
This seems to stop style-data (called by inline-css) from working.
We should create a demo page and send the welcome email.
The page will be created by Angular so we'll let it be hosted in github pages.
I have created a page that renders fine when served via SSR, but the email generation does not seem to render grid systems correctly. Columns appear to just render one on top of the other, as normal divs without widths. I have tried with Material Layout Grid and Bootstrap Grid. Is there a way to get these to work?
For example, the mat-card-title will have styles similar to the below
<mat-card-title style="font:400 56px/56px Roboto, 'Helvetica Neue', sans-serif;">
...
</mat-card-title>
The tag name mat-card-title
should be replaced with div
.
However, the slash in the font name is causing issue to the parser, so the open tag remain unchanged. The closing tag is successfully replaced, which creates unclosed tag in the end.
At the moment, the nue-extension tags are designed to be used in pair. But there're cases where it will not be used in this way. Take angle bracket (>) for example, the following will not behave as expected.
opt.map (x => x + 1)
We should add a <nue-raw></nue-raw>
extension tag. This tag will treat everything inside as code. With proper unescaping these codes can go back to what they should be and the nue-tagging requirement can also be minimized.
We should allow all SVG tags, despite they can not be displayed in Gmail.
When running on Windows node_modules/.bin/angular-universalize-email
displays the following error:
Unhandled rejection Error: ENOENT: no such file or directory, open 'C:\C:\Eclipse\Workspaces\workspace.photon\Tutorial\dist\foo-email\styles.css'
.
I have just submitted a PR, #10, that fixes the error.
Looks like the emails keep responsitivity on the Gmail app, but not on Apple mail.
Simply use npm install angular-universalize-email --save-dev
will not installed the dependencies.
Therefore, you'll see errors like Cannot find module 'inline-css'
.
Braces are the basic element of programming language, and is the cornerstone of many template engines.
Mustache for example, use double braces to do interpolation. Unfortunately
double braces were used by Angular, and it won't make it through to the generated template.
Angular also do not like single braces, so you may not use things like
@if(someCondition) { ... }
.
For the moment, you can get around it by adding the below variables to your page component:
class SomeComponent {
LDB = '{{';
RDB = '}}';
LB = '{';
RB = '}';
}
And use them in your html like this:
<my-foo-component>
{{LDB}} user.name {{RDB}}
</my-foo-component>
The next version will add support for braces, so you don't have to define the variables by yourself.
The idea is add syntax like the below.
<my-foo-component>
<nue:DB> user.name </nue:DB>
</my-foo-component>
It seems that telephone links (<a href="tel:8003432004">Link</a>
) do not translate properly. The 'href' attribute gets removed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.