Angular+JQ+Bootstrap
by alehro
HTML
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="http://code.angularjs.org/1.0.0/angular-1.0.0.js"></script>
<div id="container" ng-controller="MyCtrl">
{{model.name}}
</div>
JavaScript
var app=angular.module('myApp', []);
var $injector =angular.injector(['ng']);
$injector.invoke(function($compile, $rootScope) {
var html = '<div ng-controller="MyCtrl1">{{model.name}}</div>'
var scope = $rootScope.$new();
scope.model = {name:'MyCtrl1'};
//alert(scope.model.name);
var e3 = $compile(html)(scope);
$('#container').append(e3[0]);
});
function MyCtrl($scope) {
$scope.model={};
$scope.model.name = 'MyCtrl';
};
function MyCtrl1($scope) {
//alert('MyCtrl1');
};