Home  >  Article  >  Web Front-end  >  使用angular写一个hello world_AngularJS

使用angular写一个hello world_AngularJS

WBOY
WBOYOriginal
2016-05-16 16:18:241201browse

angularjs遵循MVC模式,惯例来一个hello world吧

复制代码 代码如下:



   
   


   

       

{{greeting.text}}, world


   



controllers.js中的内容

复制代码 代码如下:

function HelloController($scope) {
    $scope.greeting = { text: "Hello"};
}

MVC写起来很不错的感觉~~

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn