Anson Yao
Anson Yao

Reputation: 1584

Can I achieve semi-realtime effect with Angular?

New to Angular and want to understand more about it. I know Ajax can have real time effect by basically repeatedly sending Http requests to server on short time intervals. Can I achieve similar real-time effect using Angular? If true to previous question, how does Angular achieve the real-time effect? Is it the same as Ajax?

Upvotes: 0

Views: 44

Answers (2)

Clint
Clint

Reputation: 2793

In order to be realtime you would need to have server code that pushes data to applications. Angular, which is client side javascript, will only have the ability to pull.

Upvotes: 1

Sword Strid
Sword Strid

Reputation: 11

Hmm, I think you should Google some defination about, Ajax, Realtime, and might be Framework also.

But basiclly, AJAX not is realtime. In a deep, It's only effect which make better experience for user. In addition, it's related to Single Page Application.

Realtime is action interactive with many users. The best example you can see is Facebook, chat or notification. User 1 can send message and User 2 can see instantly, no need to reload. Diffirent for AJAX, User 2 can not see the message if he don't reload browser.

About part 2 of your question, after understanding AJAX, realtime. You can use some third party like Socket, Firebase ... which able to use realtime for your Angular app.

Upvotes: 1

Related Questions