본문 바로가기

Javascript/Angular

(22)
Angular2 Router import {Router} from '@angular/router'; this.router.navigate(['idea-view',this.boardType ,seq]); 라우터 파일 { path: 'idea-view/:type/:seq', component: IdeaViewComponent },
Angular2 with Jquery // In the console // First install jQuery npm install --save jquery // and jQuery Definition npm install -D @types/jqueryimport $ from 'jquery'; // $('#elemId').width();
angular cli로 component 생성하기 ng create component 이름
AngularJs Factory와 Restful Service 출처 : http://weblogs.asp.net/dwahlin/using-an-angularjs-factory-to-interact-with-a-restful-service 서버 사이드public class CustomersController : ApiController { ICustomerRepository _Repository; public CustomersController() { //CustomerRepository could be injected if desired _Repository = new CustomerRepository(); } // GET api/customers public HttpResponseMessage Get() { var custs = _Repository.GetCust..
avaScript Data Binding with AngularJS Part II – Binding a View to a Controller/ViewModel http://weblogs.asp.net/dwahlin/archive/2012/08/05/javascript-data-binding-with-angularjs-part-ii-binding-a-view-to-a-controller-viewmodel.aspx 위의 글을 번역한 겁니다. 다소 내용이 변경될수 있습니다. 나의 전 post에서 데이터바인딩을 할때 AngularJS프레임워크가 어떻게 사용되는지 보여주었다. ng-model과 결합된 {{ name }} 지시어를 사용함으로써 데이터 바인딩이 이뤄진다. 데이터바인딩을 하기에 매우 쉽다 . 이 post에서는 여러분들에게 데이터를 저장하는 컨트롤러를 생성하는 과정과 페이지에서 특별한 기능들을 제공하는 컨트롤을 생성할것이다. 이 컨트롤러는 특별한 객체 $sco..
JavaScript Data Binding with AngularJS Part I – Getting Started http://weblogs.asp.net/dwahlin/archive/2012/07/29/javascript-data-binding-with-angularjs-getting-started.aspx위에 글을 번역한 것입니다.JavaScript Data Binding with AngularJS Part I – Getting Started Getting Started with AngularJS AngularJS가 무엇이과 왜 자세히 봐야하는가? 이질문에 대답하기 위해서 잠시 시간을 갖고 HTML이 제공하는 기능에 대해서 잠시 생각해 보자. 이것은 다이나믹 Applicaiton을 위해 디자인된게 아니라는 것은 누구나 알고 있다.– 이것은 정적인 마크업언어이다. HTML자신만으로 여러분들은 요소들을 생한다든지 어..