Skip to content

Angular task 1#5

Open
amanrajs wants to merge 7 commits intomasterfrom
AngularTask-1
Open

Angular task 1#5
amanrajs wants to merge 7 commits intomasterfrom
AngularTask-1

Conversation

@amanrajs
Copy link
Owner

No description provided.

}
});
return false;
} }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentation here

filterArticles(filter) {
if (!this.flagFilter) {
this.temp_articles = this.articles;
document.getElementById('btnFilter').innerText = 'Clear Filter';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use binding instead of manipulating dom manually

</div>

</div>
<div [id]="news.postId" class="modal">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the objective is to have the modal in another component and use @input & @output to show the modal

@@ -0,0 +1,13 @@
<div [className]="'container'">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i do not see any use of this component

@mnhaque
Copy link

mnhaque commented Sep 2, 2019

going to 'create' route redirects to 'login' whereas add atricle goes to the same route

if (!this.flagFilter) {
this.temp_articles = this.articles;
this.btnText= 'Clear Filter';
document.getElementById('btnFilter').style.color = 'red';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as we discussed earlier, use binding instead of manipulating dom directly

}
else {
document.getElementById('btnFilter').innerText = 'Filter';
document.getElementById('btnFilter').style.color = 'black';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as we discussed earlier, use binding instead of manipulating dom directly

tempData: any;
constructor(private http: HttpClient) { }
getArticles(): Observable<IArticle[]> {
return this.http.get<IArticle[]>('http://localhost:4200/assets/data/newsArticles.json');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the path should be driven from config/constant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants