(HTML)
<img id="dom-demo" src="dom-demo01.png"/>
(JavaScript)
var imgObject = getElementById('dom-demo');
imgObject.src = "dom-demo02.png";
(HTML)
<img id="dom-demo" src="dom-demo01.png"/>
(JavaScript)
var imgObject = getElementById('dom-demo');
imgObject.src = "dom-demo02.png";
<div ng-controller="LoginController">
<input type="text" ng-model="LoginController.user"/>
</div>
(JavaScript)
angular.module('app', [])
.controller('LoginController', function($scope) {
$scope.user = "shinobu";
});
<div ng-controller="LoginController">
<input type="text" ng-model="LoginController.user"/>
</div>
https://github.com/occ-corp/polaris-web
angular.module('app', [])
.controller('LoginController', function($scope) {
var user = new User();
});
(TypeScript)
module app.controller {
export class LoginController {
User user = new User();
}
}
<div ng-controller="LoginController">
<input type="text" ng-model="LoginController.user"/>
</div>
(Jade)
div(ng-controller='app.controller.LoginController')
input(type='text', ng-model='login.user')