Questions tagged [subject]
394 questions
3
votes
2 answers
Angular spinner infinite looping while ngIf in router-outlet
I am creating an application with frontend in Angular with backend in Laravel.
This application includes an interceptor to display a spinner. For this, I created a service with a BehaviorSubject and an Observable like this:
export class…

Michel Silva
- 87
- 8
3
votes
1 answer
Can't send emojis in subject when sending mail with PHPMailer
My PHPMailer relevant options are configured like this:
$mailer = new PHPMailer();
$mailer->IsSMTP();
$mailer->SMTPAuth = true;
$mailer->CharSet = "UTF-8";
$mailer->isHTML(true);
Then, if i try to send an email to my hotmail.com account, with some…

Oscar Galo
- 339
- 2
- 12
3
votes
2 answers
private Subject vs. public readonly Subject in Shared Services
I have started working on an angular 8 project where two sibling components have to exchange data. So far, the approach was to have an EventEmitter in the parent's service. The child components then called the emit methods on these emitters to pass…

skye93
- 61
- 5
3
votes
3 answers
rxjs - stop observable with a subject subscription
I created an Observable generating potentially infinite amount of data (e.g. a timer). This data is accessed through a subject, so multiple observers would receive the same values.
How to stop the Observable generating new values? (without modifying…

nagy.zsolt.hun
- 6,292
- 12
- 56
- 95
3
votes
1 answer
How can I reset accumulator of scan on ReplaySubject?
I have a ReplaySubject that accumulate data with scan operator and every 10000 ms should be reset. Is there any another way to do it?
Now:
let subject = new ReplaySubject();
subject.scan((acc, cur) => {
acc.push(cur);
return…

dariashka
- 175
- 1
- 13
3
votes
1 answer
Merging Observable and take action when all subjects have emitted a value
I'd like to merge observables into one and then subscribe when ALL of the subjects have emitted a value. So far, I've tried Observable.merge and Observable.zip
public A:Subject = new Subject();
public B:Subject = new Subject();
public…

PowerLove
- 303
- 8
- 25
3
votes
1 answer
Does a Subject safely unsubscribe its subscribers when it completes?
If I have this class with a subject that emits a single value during its life:
export class MyClass {
myEmitter$: Subject = new Subject();
someMethod(){
this.myEmitter$.next();
this.myEmitter$.complete();
}
}
and then in…

user776686
- 7,933
- 14
- 71
- 124
3
votes
1 answer
How to delete / destroy an observable in an angular 2+ template
I have an observable (or subject) in an angular 4 component, and I'm using that in the template with an async pipe, something like this:
The active order was created at {{…

R. Wenger
- 288
- 3
- 15
3
votes
3 answers
RxJava Subject emits on incorrect scheduler
I have a following class which I hold as a singleton:
public class SessionStore {
Subject subject;
public SessionStore() {
subject = new SerializedSubject<>(BehaviorSubject.create(new Session());
}
public…

bakua
- 13,704
- 7
- 43
- 62
3
votes
3 answers
How to explain RxJS Subject to someone with Angular 1.X background
according to the official docs, I can use a Subject like this:
docs
However, I find it a rather theoretical explanation.
I have a strong background in Angular 1.X.
Can someone describe me, the concept 'subject' by comparing it with something in …

hannes neukermans
- 12,017
- 7
- 37
- 56
3
votes
2 answers
Change subject in TFS 2015 email alerts
I'm trying to change the subject of email alerts generated by TFS 2015. So far, I figured out, where to find the template of the email body at
c:\Program Files\Microsoft Team Foundation Server 14.0\Application…

Hanno
- 31
- 2
3
votes
4 answers
In Observer Design pattern, are Subject and Observable the same thing?
In Observer design pattern, the observer observes the subject and/or the observable. Observer gets notified by their updates.
I am confused whether those two things (subject and the observable) are essentially the same things? Or is there a subtle…

Haris Ghauri
- 547
- 2
- 7
- 27
3
votes
2 answers
Concatenate mail subject in PHP mailer
I have a form for users to submit their inquiry which will be sent as an email. As users are able to select their inquiry type, i wish to concatenate the inquiry type into the subject of the email.
$formname = "Website Inquiry Form";
$inquirytype =…

Spiral1ng
- 313
- 1
- 7
- 16
3
votes
2 answers
getting the most current value of Subject line of an Outlook AppointmentItem
I have issues accessing the actual typed-in text in Subject field of an AppointmentItem.
I have created an Outlook 2010 add-in that has a callback from a custom button from the ribbon.
I can get the value of the Subject field except if someone is…

Nick DK
- 41
- 4
3
votes
1 answer
BlockingCollection vs Subject for use as a consumer
I'm trying to implement a consumer in C#. There are many publishers which could be executing concurrently. I've created three examples, one with Rx and subject, one with BlockingCollection and a third using ToObservable from the BlockingCollection.…

Dave Hillier
- 18,105
- 9
- 43
- 87