スキップしてメイン コンテンツに移動

投稿

12月, 2019の投稿を表示しています

[Angular][ASP.NET Core] Upload chunked files

Intro I wanted to send files to Web application (made by ASP.NET Core). If the file size had been small, I didn't need do any special things. But when I tried to send a large file, the error was occurred by ASP.NET Core's limitation. Though I could change the settings, but I didn't want to do that, because I hadn't known the file sizes what would been actually using. So I splitted the data into chunks first, and sent them. After receiving all chunks, I merged them into one file. There might be some libraries or APIs (ex. Stream API) what did them automatically, but I couldn't find them. What I did [ASP.NET Core] Make CORS enabled [Angular] Split a large file into chunks [Angular][ASP.NET Core] Send and receive data as form data [ASP.NET Core] Merge chunks into one file [ASP.NET Core] Make CORS enabled Because the client side application(Angular) and the server side application(ASP.NET Core) had been separated, I had to make CORS(Cross-Origin Requests)

[Angular]Transfer data between the components

Create pages with Angular Create pages with Angular 1 Create pages with Angular 2 Create pages with Angular 3 What I did getting/setting data for select tag transfer data between parent component and child components getting/setting data for select tag I got list items from service and added options to selectbox. favorite.ts export interface Favorite { displayValue: string; favoriteId: number; } favorite.service.ts import {Injectable} from '@angular/core'; import {Favorite} from './favorite'; @Injectable({ providedIn: 'root' }) export class FavoriteService { public static favorites: Array<Favorite> = [ { displayValue: '☆', favoriteId: 1}, { displayValue: '☆☆', favoriteId: 2}, { displayValue: '☆☆☆', favoriteId: 3}, ]; constructor() { } } product-cell.component.ts import { Component, OnInit, Input } from '@angular/core'; import {CellComponent} from '../cell.component'; import {Product

Create pages with Angular 3

Create pages with Angular Create pages with Angular 1 Create pages with Angular 2 Data bindings with Pikaday Last time, I didn't know how to use Two-way data bindings to the element what was set date by Pikaday. According to the document, I could separate [(ngModel)]="dateText" like below. Before &ltinput type="text" id="datepicker" [(ngModel)]="dateText"> After &ltinput type="text" id="datepicker" [value]="dateText" (input)="dateText=$event.target.value" > And because when Pikaday set text, the input event wasn't fired, thus I got nothing. So I changed the event. &ltinput type="text" id="datepicker" [value]="dateText" (change) ="dateText=$event.target.value"> Template Syntax - Angular Background color for IE11 When I had set background-color like "background-color:#000000AA", the color wasn't shown