라벨이 Add인 게시물 표시

Angular Add Component

이미지
  1. 수동으로 Component 생성 사진1) manul 폴더및 파일생성 // src/app/manual/manual.component.ts import { Component } from '@angular/core' ; @ Component ({ selector : 'app-manual' , // component명칭을 작성한다. templateUrl : './manual.component.html' , // 해당 component가 사용할 html 템플릿 주소를 입력한다. }) export class ManualComponent {} 코드1) ts파일 작성 <!-- src/app/manual/manual.component.html --> <h1> This component was build by manual! </h1> 코드2) html파일 작성 // src/app/app.module.ts import { NgModule } from '@angular/core' ; import { BrowserModule } from '@angular/platform-browser' ; import { AppComponent } from './app.component' ; import { ManualComponent } from './manual/manual.component' ; @ NgModule ({ declarations : [ AppComponent , ManualComponent ], // declarations에 components class를 추가한다. imports : [ BrowserModule ], providers : [], bootstrap : [ AppComponent ], }) export class AppModule {} 코드3) 앱 모...

git - Repository에서 clone 및 add, commit과 push하기

이미지
  저번에 gitHub에서 repository를 생성하고 branch를  만드는법에 대해서 알아봤습니다. 이제 repository에서 프로젝트를 받아서 수정하고 올리는 작업을 하겠습니다. 처음 repository에서 Code버튼을 클릭합니다. 위 url을 복사합니다. 이제 git clone을 해서 dev branch의 repository를 긁어옵니다. $ git clone -b [branch name] [repository url] copy  git repository에서 clone을 받게 되면 위 사진처럼 해당 폴더와 파일이 생성된 것을 알수 있다. 이제 git의 branch을 생성하도록 하겠습니다. $ git checkout -b [branch name] copy npm 초기화를 진행합니다. 빠른 진행을 위해서 --y를 추가합니다. $ npm init --y copy git 변경사항을 볼때 'package.json'이 추가된 것을 알수 있습니다. 이제 이것을 추가해야 합니다. 위 사진은 'package.json'이 추가된 상태 입니다. git add 하는 방법은 2가지가 있는데 이는 'git, gitHub 정보' 글을 참고해 주시기 바랍니다. 변경점에 대해서 add가 끝나면 이제 commit을 합니다. commit할때 commit 이름을 작성해 줍니다. $ git commit -m [commit name] copy commit이 끝난후 git 상태 branch변경시 git, 프로젝트 상태  위 사진을 보면 branch가 addFile1 -> dev으로 변경됬음을 알수 있다. 변경후 dev을 처음 clone한 상태가 된것을 알수 있다. 이는 git이 항상 branch의 변경사항에 대해서 추적하기 때문에 가능한 것이다. 따라서 세밀하게 branch을 생성하면 그만큼 변경된 코드에 대해서 기록이 더 많이 남는 것이다. 이제 git push를 해줍니다. original은 처음 clone을 받은 곳을 말합니다. 즉...

DB mysql Basic Query - Add, Delete Data from Table, Delete Table

이미지
 OS : Ubuntu Add Record in Table -> INSERT INTO [table name](name : column1, column2, .....)      VALUES(value1, value2, ....);     Delete Record in Table -> DELETE FROM [table name] WHERE [column name] = '[element]'; Delete Table -> DROP TABLE [table name]; Priveous Link

DB mysql Basic Query - CREATE(DB, Table), Add(Column), Delete(DB, Table, Column)

이미지
OS : Ubuntu Start mysql - sudo mysql Shows the current DB - SHOW DATABASES; Create DataBase -> CREATE DATABASE [DB name]; Delete DB -> DROP DATABASE [DB name]; Warning: If you delete the DB, the data will also be deleted. Use the DB -> USE [DB name]; Create Table -> CREATE TABLE [Table name](     [column name] INT NOT NULL AUTO_INCREMENT, -> id is primary number      [column name]  VARCHAR(255) NOT NULL,     PRIMARY KEY( [column name] )     ); INT : integer number NOT NULL : Not allow null AUTO_INCREMENT : id number will increase automatically VARCHAR : You could type string PRIMARY KEY([column name]) : Assign a Primary key Show tables -> SHOW TABLES; Add column in the existed table -> ALTER TABLE [table name]     ADD COLUMN [column name] INT AFTER [existed column name]; -> 'age' is what you want to add ALTER TABLE [table name] : Update table ADD COLUMN : Add column AFTER name : column 'name' is already ...