标签:创建 app 1.3 方法 3.0 rip angularjs src []
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>angular.bootstrap</title> </head> <body> <h1>angular.bootstrap</h1> <p> <span>描述:</span><br /> <span>此方法用于手动加载angularjs模板</span> </p> <p> <span>使用方法:</span><br /> <span>angular.bootstarp(element, [modules], [config])</span> </p> <p> <span>参数:</span><br /> <span>element: DOM Element,dom元素</span><br /> <span>modules: Array,要加载的模板</span><br /> <span>config:Object,返回这个程序的新创建的injector对象</span> </p> <p> <span>返回值:</span><br /> <span>返回动态绑定之后的函数</span> </p> <hr /> <div ng-controller="welcomeController"> <span ng-bind="greeting"></span> </div> </body> <script src="../../js/angular.1.3.0.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> var app = angular.module(‘demo‘, []).controller(‘welcomeController‘, function($scope){ $scope.greeting = ‘welcome!!!!‘; }) angular.bootstrap(document, [‘demo‘]) </script> </html>
标签:创建 app 1.3 方法 3.0 rip angularjs src []
原文地址:https://www.cnblogs.com/tanxiang6690/p/9764638.html