Step 1: create-event.component.html (Initially) Step 2: event.service.ts Step 3: create-event.component.ts Step 4: create-event.component.html app.module.ts
Tag: binding
style and ngStyle binding in Angular
event-list.component.ts file event-thumbnail.component.ts file app.module.ts file
Class and ngClass binding in Angular
event-list.component.ts file event-thumbnail.component.ts file app.module.ts file
Angular Component Interaction – Binding
Binding is basic form of interaction between the component class and it’s corresponding template Step 1: for new project creation Step 2: For project running follow this command app.module.ts file app.component.ts file app.component.html file
দিন ৪ – প্রপার্টি বাইন্ডিং
প্রপার্টি বাইন্ডিং মূলত কম্পোনেন্ট ক্লাস (app.componal.ts) থেকে ইউজার এন্ড(app.componal.html) এ ডাটা পাস করার জন্য ব্যবহার করা হই । সিনটেক্স [Property]=”expression” প্রপার্টি বাইন্ডিং [ ] বন্ধনী ব্যবহার করে। বাইন্ডিং টার্গেট বর্গাকার বন্ধনীগুলির ভিতরে স্থাপন করা হয়। বাইন্ডিং সোর্স ডাবল কোট এর মধ্যে আবদ্ধ। আপনি এই কোডগুলি app.componant.html এ যুক্ত করতে পারেন এবং ফলাফলটি দেখতে পারেন <p…Continue reading দিন ৪ – প্রপার্টি বাইন্ডিং
Day 6 – Style Binding
# <h3 [style.color]=”‘orange’”>Style Binding</h3> # public hasError = false; <h3 [style.color]=”hasError ? ‘red’ : ‘green’”>Style Binding with ternary condition</h3> # public highlightColor = “orange”; <h3 [style.color]=”highlightColor”>Style Binding 2</h3> public titleStyle = { color: “blue”, fontStyle: “italic” } <h3 [ngStyle]=”titleStyle”>Style Binding 3</h3>