app.run(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);
scope.$apply();
$('#container').append(e3[0]);
});
沒有留言:
張貼留言