<div ng-app="myApp" ng-controller="myCtrl">
<input ng-model="name">
<p>Hello, {{name}}</p>
</div>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.name = 'John';
});
<button id="myButton">Click Me</button>
<p id="myText"></p>
$('#myButton').click(function() {
$('#myText').text('Hello World!');
});
class MyComponent extends React.Component {
constructor(props) {
super(props);
this.state = { name: 'John' };
}
render() {
return <p>Hello, {this.state.name}</p>;
}
}
ReactDOM.render(<MyComponent />, document.getElementById('root'));