This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
mvc
larukedi edited this page Nov 18, 2014
·
7 revisions
Usage: $l.mvc.init()
$l.ready(function() {
$l.mvc.init();
});
Usage: $l.mvc.bind(app, model[, controller])
<div lr-app="test">
{{hello}}
<span style="color: {{favoritecolor}};">{{name}}</span>
</div>
$l.ready(function() {
var myModel = { hello: 'hi', name: 'eser', favoritecolor: 'orange' };
$l.mvc.init();
$l.mvc.bind('test', myModel);
});
Usage: $l.mvc.bind(app, model[, controller])
<div lr-app="test">
{{hello}}
<span style="color: {{favoritecolor}};">{{name}}</span>
</div>
function test($scope) {
$scope.name = $scope.name.toUpperCase();
}
$l.ready(function() {
var myModel = { hello: 'hi', name: 'eser', favoritecolor: 'orange' };
$l.mvc.init();
$l.mvc.bind('test', myModel);
});
Please don't hesitate to submit issues and pull requests.