TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mandar Shinde
NA
423
115.6k
Regarding ngIf and ngIfElse
Feb 18 2019 2:53 AM
Dear All,
I am beginner in Angular 5 and ASP .net MVC. I was creating one web page using Angular 5.
In a table I was printing data which comes from database with table name tblStudent.
In that table there is last last column with name Active which is Boolean value.
What I am doing with help Angular 5 I am just showing one checkbox enabled or disabled.
If I am getting value true then I should able to check the checkbox.
Here is my code which won't work :
<
table
>
<
tr
*
ngFor
=
"let item of items | paginate: { itemsPerPage: 10, currentPage: p }; let i = index"
>
<
td
>
{{ 10 * (p - 1) + i + 1}}
</
td
>
<
td
>
<
ng-template
[ngIf]="
item.Activate
== true" [ngIfElse]="elseBlock"
>
<
div
>
<
input
type
=
"checkbox"
(change)="selected(item, $event)"
>
</
div
>
</
ng-template
>
<
ng-template
#elseBlock
>
<
div
>
<
input
type
=
"checkbox"
(change)="selected(item, $event)" disabled
>
</
div
>
</
ng-template
>
</
td
>
<
td
>
{{item.Group_Name}}
</
td
>
<
td
>
{{item.Description}}
</
td
>
<
td
>
<
i
class
=
"material-icons icon-Green"
id
=
"cursor"
(click)=" ViewMisc(item.ID,content) "
>
border_color
</
i
>
</
td
>
</
tr
>
</
table
>
Please help me with easy solution.
Thanking you in advance
Reply
Answers (
2
)
Port 4200 is already in use. Use ‘–port’ to specify a differ
Get the data from cloudant database