[AngularJS] Re: Export HTML to PDF in angularjs 1.x

2017-02-09 Thread Yoav Luft @ Matific
I had done something similar a year ago, I hope that helps: 
https://missingclosure.wordpress.com/2015/11/29/rendering-angularjs-to-pdf/ 

On Wednesday, February 8, 2017 at 11:51:46 AM UTC+2, desmart wrote:
>
> Hi all,
> i want to export my html content to pdf. I'm looking google and i found 
> pdfmake and html2canvas to export.
> The problem is this..
> Ex : 
> 
> My content
> 
>
> I want to export content without show in html. Just show pdf in browser.
> When i export like code above, pdfmake didn't got content in #mycontent 
> because angular hide this.
> Help me !!!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Code review

2017-02-05 Thread Yoav Luft @ Matific
Hi Mark!

Just a couple of weeks ago I was talking to my partner (who is also a 
programmer) about the need for code reviews for people who work alone or 
for teams who are all new to a technology. I started to investigate and 
found out that something similar already exists on 
http://codereview.stackexchange.com/

Regards,
Yoav

On Thursday, February 2, 2017 at 9:54:40 AM UTC+2, Mark M wrote:
>
> I am an experience developer, but new to Angular.
>
> Is this a good place to ask for critique/code review on a new Angular 
> project?  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Angular2 i18n state

2017-01-09 Thread Yoav Luft @ Matific
We're using it in Matific on a not-yet-deployed site.
Currently, there is no programmatic access to text resources. To bypass 
that, I've created a template in which all strings that need to be accessed 
programmatically will reside, and then we load the relevant XLF file and 
parse it in our code to extract the translated messages. This isn't great, 
but it works.

On Thursday, January 5, 2017 at 8:50:23 AM UTC+2, Martin Kuhn wrote:
>
> Hi,
>
> does anybody of you has real world experience with i18n? 
>
> I have the impression that this stuff is not really useful at this time
>
> e.g. is there a way to handle programmatic access to text resources (and 
> so on)?
>
> Regards
>
> Martin
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Contributing documentation

2017-01-01 Thread Yoav Luft @ Matific
Hello y'all!

How can I contribute documentation for Angular 2 branch? I'm looking to 
expand the documentation on translations which has a lot of good but not 
documented features.

Thank you!

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Philosophy: Configurable components: Configuration objects vs. ContentChildren

2016-11-30 Thread Yoav Luft @ Matific
Thank you Sander,

I would like hear from you when would you prefer each approach. 



On Tuesday, November 29, 2016 at 11:21:54 AM UTC+2, Sander Elias wrote:
>
> Hi Yoav,
>
> You should do both. There is a difference in use-cases. For myself, I 
> prefer the content-children approach. However, there are cases where the 
> json config will be much easier to integrate into your app.
> I can go more deeply into the why I think you should provide both, and 
> also why I think it's not that much of an overhead, but I think you know 
> most of it already. But feel free to ask!
>
> Regards
> Sander Elias
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Understanding Code

2016-11-29 Thread Yoav Luft @ Matific

   
   - core-js/client/shim - used for ES6 shims and polyfills. This is for 
   solving browser missing features etc.
   - zone.js - used for creating isolated environments in Javascript, used 
   by Angular2.
   - Reflect.js - ?
   - systemjs - Used by angular for configuration, loading parts, and some 
   other stuff. I'm not that sure because I use webpack, but they fill the 
   same "spot" in the build.


as for `System.import('app')`, it tells System.js (or ES6 compatible 
browser) to import your remote application code. This call will actually 
load your code and bootstrap Angular2. it will return a promise, and we 
use  a `catch(...)` clause to handle any errors in importing or 
boostrapping. 



On Tuesday, November 29, 2016 at 2:55:32 AM UTC+2, foysal foysal wrote:
>
> I am learning angularjs 2. I am following this 
>  git repo. 
> Here I got below codes in *index.html*.
>
>  src="node_modules/zone.js/dist/zone.js"> src="node_modules/reflect-metadata/Reflect.js"> src="node_modules/systemjs/dist/system.src.js"> src="systemjs.config.js">
>   System.import('app').catch(function(err){ console.error(err); });
>
> Why these codes used in *index.html* ? 
>
> What are the necessitys of including these JavaScript files ?
>
> What do they do here ?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Accessing translations providers by a service

2016-11-29 Thread Yoav Luft @ Matific
Thank you.
I've actually managed to answer most it myself, but there's still two 
issues:

   1. I can't inject TRANSLATIONS after bootstrap. Not sure why, but it 
   seems I might need to provide it twice and parse it twice.
   2. There's an open issue on ng-xi18n not parsing code or anything which 
   is not templates. I'm going to fool it by creating a component that won't 
   be used only for translations.
   

On Monday, November 28, 2016 at 9:02:17 PM UTC+2, Tito wrote:
>
> How do you determine the current locale selected?
>
> 1. From what I am reading here (
> https://angular.io/docs/ts/latest/cookbook/i18n.html) it seems what is 
> parsed is what you define you want to be translated using 
> 2. I guess you could take your json files and somehow inject them into 
> each locale file needed by Angular 2 translation as part of your build?
> locale/messages.fr.xlf. But then you cannot leverage dynamic changes which 
> leads me to recommend using some database backend to store yoru translated 
> files. Depends I guess
>
>
>
> On Thursday, November 24, 2016 at 4:21:27 AM UTC-8, Yoav Luft @ Matific 
> wrote:
>>
>> I'm examining different ways to support translations in our hybrid 
>> angular 1 + angular 2 app.
>> In our current code base using Angular 1.2 we load a JSON file with keys 
>> to translations that we inject using our own service/directive/filter. This 
>> approach requires from us to update the source JSON file manually.
>>
>> I've tried using the internationalization method described in the angular 
>> 2 docs, but it raises a number of questions:
>>
>>1. What resources are being parsed? All templates?
>>2. Can I add messages manually somehow? Can I add collect messages 
>>from JSON files or code?
>>3. How can I access the loaded messages through a service? I tried 
>>getting it using the TRANSLATIONS OpaqueToken but it didn't work.
>>4. If 2 or 3 are impossible, how else can I translate text that does 
>>not originate from a template?
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Re: Keeping the static files secure

2016-11-26 Thread Yoav Luft @ Matific
You can use Webpack's code splitting 
 capabilities to split your 
SPA to login, and then load the rest after the user had logged in. This is 
assuming that your static file server has some kind of authorization 
support. This approach is very good from user experience view point because 
the anonymous user will only a minimal page with the things relevant to her.

Of course, keep in mind that preventing an attacker access to your 
front-end (or even back-end) code is no mean of security at all. The 
attacker can always sign-up and get your code. The attacker might be an 
ex-employ that already knows the code base. The attacker might guess his 
way into the API, or use some third party to obtain the code. 

On Saturday, November 26, 2016 at 12:45:00 PM UTC+2, Pāvils Jurjāns wrote:
>
> A veteran web developer here, so need some philosophy update here, now 
> when I start developing in Angular 2.
>
> So I'm going for the architecture where all the Angular 2 app is served as 
> bunch of static files (bundled by webpack, but static nevertheless) and all 
> the client-server communication takes place via RESTful API.
>
> The api keeps all the functions locked if the session is not authenticated 
> (with an exception of authentication API, of course). 
>
> Where I'm getting uncomfortable is that the application files can be 
> accessed by unauthorized user - with some dedicated digging, they can find 
> out a lot of info about the interface and data structures. Enough to 
> prepare various type of phishing or hacking attacks.
>
> If the application is served with oldschool approach, the html prepared on 
> the server side, the only thing accessible by unauthorized user is the 
> authentication page.
>
> What is the general feeling in the Angular camp about this? That there is 
> nothing special in the interface and data structures that is worth hiding? 
> And that all that has to be secure is the REST API as that is all that 
> matters? Or there are Angular 2 patterns that serve the "secure" static 
> files of an Angular 2 application only when the user is authenticated? 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


[AngularJS] Accessing translations providers by a service

2016-11-24 Thread Yoav Luft @ Matific
I'm examining different ways to support translations in our hybrid angular 
1 + angular 2 app.
In our current code base using Angular 1.2 we load a JSON file with keys to 
translations that we inject using our own service/directive/filter. This 
approach requires from us to update the source JSON file manually.

I've tried using the internationalization method described in the angular 2 
docs, but it raises a number of questions:

   1. What resources are being parsed? All templates?
   2. Can I add messages manually somehow? Can I add collect messages from 
   JSON files or code?
   3. How can I access the loaded messages through a service? I tried 
   getting it using the TRANSLATIONS OpaqueToken but it didn't work.
   4. If 2 or 3 are impossible, how else can I translate text that does not 
   originate from a template?


-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.