AngularJs 简单数据绑定
2016-04-07 14:18
555 查看
/homePage.html <div class="homePageBody"> <div>Value = {{ testValue}} </div> </div> //homePage.js angular.module('myApp.test', ['ngRoute']) .config(['$routeProvider', function($routeProvider) { $routeProvider.when('/', { templateUrl: 'views/homePage/homePage.html', controller: 'homePageController' }); }]) .controller('homePageController', ['$scope', '$timeout', function($scope, $timeout) { $scope.testValue = 100; // .... $timeout(function() { $scope.testValue = 200; }, 1000); // ... }]);
相关文章推荐
- AngularJs 使用 $timeout
- Angularjs基础教程
- AngularJs 弹出模态框(model)
- 详解AngularJS 模态对话框
- 理解angular中的module和injector,即依赖注入
- AngularJS 模态对话框
- AngularJS 1.x学习<2>
- [置顶] 跟我学AngularJs:AngularJs入门及第一个实例
- [Angular 2] *ngFor with index
- AngularJS 1.x学习<1>
- 详解AngularJS 模态对话框
- AngularJs 弹出模态框(model)
- angularjs 前端页面之用户修改密码
- angularjs中动态为audio绑定src
- AngularJS 最常用的八种功能
- angularjs自定义过滤器demo
- AngularJS之基础-5 路由(定义路由、使用路由)、自定义指令(Directive)
- AngularJS之基础-4 DI(控制器参数、监听)、指令(模板包含、节点控制)、事件绑定
- AngularJS之基础-3 控制器(基本语法)、模块(使用模块注册控制器)
- 慕课网AngularJS实战课程笔记