2013-07-25 2 views
0

와 HTML의 두 모델을 정의 할 수 있습니까?어떻게 내가</p> <p>내가 그것을 어떻게 정의합니까 html로 두 모델을 정의하려면 내가 AngularJS와</p> <p>에 새로운 오전 AngularJS와

나는 D

experiment.config (function($routeProvider) { 
$routeProvider.when("/",{ 
templateUrl : "function1.html", 
controller: 'functionCrtl'}); 

<div ng-app="experiment_left"> 
<div ng-controller="accordtionCrtl"> 
    <div ng-model="accordtion.accordtion"> 
     <ng-view></ng-view> 
    </div> 
</div> 

내가 원하는

<body ng-app="experiment"> 
<div ng-controller="functionCrtl" id="staff"> 
<div ng-modle="data1.data"> 
    <ng-view></ng-view> 
</div> 
도와주세요 그것을 많은 시간

을 시도 비하 ynamic로드 두 페이지, 어떻게해야합니까?

+1

우리가 지금까지 한 일을 볼 수

angular.module('myApp').controller('CreateUserCtrl', function ($scope) { $scope.firstname = 'John'; $scope.surname = 'Doe'; }); 

HTML? 우리는 당신에게 코드를 제공하지 않고 이미 가지고있는 것을 도울 것입니다. – dcodesmith

+0

컨트롤러는 어디에 있습니까? – dcodesmith

답변

0

그러나 질문에 대답하려면이 http://docs.angularjs.org/api/ng.directive:input을 읽으십시오.

컨트롤러 :

<form ng-controller="CreateUserCtrl"> 
    <input ng-model="firstname " type="text" placeholder="firstname"> 
    <input ng-model="surname" type="text" placeholder="surname"> 
</form> 
관련 문제