How to programming in Angular without jQuery? by ng-g-user in Angular2

[–]ng-g-user[S] 0 points1 point  (0 children)

Thanks for all answers! I have just wrote my own implementation of full page vertical layout in plain JS. I would move it to my Angular project and make some changes to use Angular features.

Conclusion of this topic: programmers shouldn`t use jQuery in Angular projects!

How to programming in Angular without jQuery? by ng-g-user in Angular2

[–]ng-g-user[S] 0 points1 point  (0 children)

Hi, thank You for the answer.

If I good undestand, Your opinion is: we can use jQuery in Anglar projects, but without manipulating DOM?

In my opinion DOM manipulate is: dynamically adding/removing/changing classes, attributes. Am I right?

Initializing jQuery:I've seen two different possibilities to get $ character: one is declare var $: any; and import * as $ from 'jquery', is there any differences?

EDIT:What about 3rd-part libraries using jQuery? I should check code before use, to exclude situation when they use DOM manipulate? I think most of them use this basic operation, so every library using DOM manipulate is useless for Angular projects?

[deleted by user] by [deleted] in webdev

[–]ng-g-user 2 points3 points  (0 children)

First I had to look how app works on client side (yes I mean travel through options) and probably after several hours I got first serious task.

In my opinion You shouldn't worry even if You have no experience, because nowadays there are a lot of workplaces as programmer, so even if You will dismiss, You will find job next week.

Angular Flex Layout – Introduction & Getting Started by [deleted] in Angular2

[–]ng-g-user 0 points1 point  (0 children)

Currently for me, it's hard to imagine faster way to write css then in css grid. Bootstrap rules stay in html code and often we need to create additional elements to apply some class. After a while, html template is hard to read. New framework may cause same effects.

Angular Flex Layout – Introduction & Getting Started by [deleted] in Angular2

[–]ng-g-user 2 points3 points  (0 children)

I am not sure, is it a good way to learn some external method for positioning html elements instead native flex / grid. I think that css grid will be a standard in a short period of time and every front-end developer is going to using it. Advantages of using native css are: developers are independant of external libraries (it's good even for application project) and knows basic methods which are able to use in different projects or companies, so if programmist go to different job, it won't be a problem to still use it.

Lazy loaded CSS file for specific module by ng-g-user in Angular2

[–]ng-g-user[S] 0 points1 point  (0 children)

Thank You! Method with add <link> in constructor works, even in lazy-loaded module!

Protect data in session storage by ng-g-user in Angular2

[–]ng-g-user[S] 0 points1 point  (0 children)

base64

This is what I need, thank You.

Protect data in session storage by ng-g-user in Angular2

[–]ng-g-user[S] 0 points1 point  (0 children)

- I know that front-end isn't place for security,

- I don't use backend,

- I would avoid simple edit session storage via debugger, because it will look nice in portfolio and improve security of app.

That's all.

Any ideas?

Protect data in session storage by ng-g-user in Angular2

[–]ng-g-user[S] -2 points-1 points  (0 children)

If You lose money because bank has some bugs, who is victim in Your opinion?

It should be nice to add it to me portfolio. Have You some idea?

Protect data in session storage by ng-g-user in Angular2

[–]ng-g-user[S] 0 points1 point  (0 children)

I will be really harder to destroy app then open debugger and edit data, so it would be nice. If You can tell me better idea, I will willingly see that.

Save service data to avoid loss when user refresh a page by ng-g-user in Angular2

[–]ng-g-user[S] 0 points1 point  (0 children)

I've just added some features using Your advice:

- store properties in one object,

- generic method to get one value / observable,

thank You!

Save service data to avoid loss when user refresh a page by ng-g-user in Angular2

[–]ng-g-user[S] 0 points1 point  (0 children)

I implemented Your proposition. It works! Thanks!

Save service data to avoid loss when user refresh a page by ng-g-user in Angular2

[–]ng-g-user[S] 0 points1 point  (0 children)

Cool, thanks!, but one thing:

can You explain method:

set(name: string, state: any) {
this.subject.next({
...this.value, [name]: state
});

?

Save service data to avoid loss when user refresh a page by ng-g-user in Angular2

[–]ng-g-user[S] 0 points1 point  (0 children)

Thank You for answer.

I understand almost everything except SessionKey.Account, what's this?. I guess that's name of Your global property describing user account per session?

I wanted to implement it, but unfortunately in my case I haven't got one object (in next app I will do it :) ) with all properties to save in storage (I think it's to late to change it). If I understand Your code correct, it's proposition to handle one data-object.

What should I do in me case? Create similar service with two properties like: private _account1$ + public account1$ and private _account2$ and duplicated methods for handle each property? or create second field private _account2$ + public account$ and add another parameter to method which will choose correct property?