xiguaxigua / vuepress-plugin-demo-block

write vue, react, vanilla js demo in vuepress
https://daxigua.me/vuepress-plugin-demo-block
MIT License
113 stars 24 forks source link

Please, how to show angular1.x demo #13

Open Akira0705 opened 5 years ago

Akira0705 commented 5 years ago

my code:

::: demo [vanilla]


<html>
  <div ng-app="myApp" ng-controller="myCtrl">
      {{ firstName + " " + lastName }}
  </div>
</html>
<script>
  var app = angular.module("myApp", []);
  app.controller("myCtrl", function($scope) {
      $scope.firstName = "John";
      $scope.lastName = "Doe";
      console.log('$scope: ', $scope);
  });
</script>
<style>
#vanilla-box {
  color: red;
}
</style>

:::
Akira0705 commented 5 years ago

head: [ ['script', { src: 'http://oss.yixtrip.com/vendor/jquery/jquery.min.js' }], ['script', { src: 'https://cdn.staticfile.org/angular.js/1.4.6/angular.min.js' }] ], plugins: [ 'demo-block' ]