mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
fix(angular.widget): Allow widgets to be styled in IE8 and below
Closes #584
This commit is contained in:
24
regression/issue-584.html
Normal file
24
regression/issue-584.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:ng="http://angularjs.org" xmlns:my="http://mynamespace.org">
|
||||
<head>
|
||||
<style>
|
||||
my\:time {color:#00f;display:block;border:1px solid #ccc;background-color:#ddd;}
|
||||
</style>
|
||||
<script src="../build/angular.js" ng:autobind></script>
|
||||
<script>
|
||||
angular.widget('my:time', function(compileElement){
|
||||
compileElement.css('display', 'block');
|
||||
return function(linkElement) {
|
||||
function update() {
|
||||
linkElement.text('Current time is: ' + new Date());
|
||||
setTimeout(update, 1000);
|
||||
}
|
||||
update();
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<my:time></my:time>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user