javascript - How can I define two model in html with AngularJs -


i new angularjs

if want define 2 model in html

how define it?

i haved tried times

please help

<body ng-app="experiment"> <div  ng-controller="functioncrtl" id="staff">  <div ng-modle="data1.data">    <ng-view></ng-view>   </div> 

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

experiment.config (function($routeprovider) {  $routeprovider.when("/",{ templateurl : "function1.html", controller: 'functioncrtl'}); 

i want dynamic load 2 page , how can do?

but answer question read http://docs.angularjs.org/api/ng.directive:input.

controller:

 angular.module('myapp').controller('createuserctrl', function ($scope) {           $scope.firstname = 'john';          $scope.surname = 'doe'; }); 

html

<form ng-controller="createuserctrl">      <input ng-model="firstname " type="text" placeholder="firstname">      <input ng-model="surname" type="text" placeholder="surname"> </form> 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -