본문 바로가기

WEB기초44

[React] 기본 개념 https://reactjs.org/를 보며 개인적인 공부를 위해 정리한 내용들입니다 Hello World constructor(props) { super(props); this.state = { posts: [], comments: [] }; } class Welcome extends React.Component { render() { return Hello, {this.props.name}; } } 아래와 같이 hello world를 출력할 수 있습니다. ReactDOM.render( Hello, world! document.getElementById('root') ); JSX 란? const element = Hello, world!; String 도 아니고, HTML도 아닌 이 문법을 JSX라고 .. 2020. 7. 30.
[Angular] Controller [Angular] Controller Controller 모듈 생성하기1. angular.module("myApp",[]); 모듈생성하기2. Ctrl1이라는 이름의 컨트롤러 생성3. myApp 컨트롤러에서 scope을 설정한다.4. 설정한 scope내부에서 선언한 name, nums는 해당 Controller에서만 적용된다.5. Ctrl2에서 선언한 friends는 ng-repeat을 이용해 출력한다. : 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263Step02_controller.html // angular 모듈 만들기 var myApp=a.. 2017. 8. 25.
[Angular] Angular 1.0 시작하기 [Angular] Angular 1.0 시작하기 1.HelloAngular 프로젝트 생성하기 2.https://angularjs.org/ 접속해서 DOWNLOAD ANGULARS 하기 - 1.2.x (legacy) , zip 3. WEB-Content 에 js 폴더 만든 후 javascript 파일만 넣는다. 4.- {{ }} 는 해석되어서 표현된다.12345678910111213hello.htmlHello Angular js10 + 10 = {{10+10}}Colored by Color Scriptercs 5.- input 창에 ng-model="msg" , 값을 입력 - {{msg}}가 값을 읽어서 출력한다.12345{{msg}}{{isChecked}}cs 6.-11 : 내부 수식 계산도 가능하다 :.. 2017. 8. 25.
[Django] CRUD 만들기 [Django] CRUD 만들기 * python 프로젝트 기본 setting 하는 법 1. Django Project 생성 2. migrate 를 해준다. 3. static 폴더와 templates 폴더를 만든다. 4. settings.py => static 폴더와 templates 폴더 설정 1.프로젝트 생성 후 가장 먼저 migrate를 해줘야한다. 2.프로젝트에 templates, static 폴더 만들기 3.settings.py에 설정하기- TEMPLATES 위에 넣기12#프로젝트의 templates 폴더의 절대 경로 얻어와서tempDir=os.path.join(BASE_DIR, "templates")cs- 맨 아래에 넣기1STATICFILES_DIRS=(os.path.join(BASE_DIR,".. 2017. 8. 21.