-
angular 一
所属栏目:[安全] 日期:2020-12-17 热度:155
import {Component} from 'angular2/core';interface Hero { id: number; name: string;}@Component({ selector: 'appTest',/*template: ` h1Hello,{{name}}!/h1 Say hello to: input [value]="name" (input)="name = $event.target.value" `*/ /* template:[详细]
-
angularjs 二
所属栏目:[安全] 日期:2020-12-17 热度:80
import {Component} from 'angular2/core';interface Hero { id: number; name: string;}@Component({ selector: 'appTest',template: ` h2可选列表/h2 ul li *ngFor="#hero of heroes" (click)="onSelect(hero)" span{{hero.id}}/span {{hero.name}} /li /u[详细]
-
AngularJS之依赖注入(实例一)
所属栏目:[安全] 日期:2020-12-17 热度:140
1、问题背景 AngularJS特有的一个依赖注入,当在一个对象创建时,需要依赖另一个对象。 2、实现源码 !DOCTYPE htmlhtmlheadmeta charset="UTF-8"titleAngularJS之依赖注入(实例一)/titlescript src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.[详细]
-
AngularJS之对话框
所属栏目:[安全] 日期:2020-12-17 热度:110
1、问题背景 AngularJS创建对话框,利用$window实现对话框 2、实现源码 !DOCTYPE htmlhtml ng-app="winApp"headmeta charset="UTF-8"titleAngularJS之对话框/titlescript src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"/scriptscriptvar[详细]
-
初学AngularJs 神奇的框架
所属栏目:[安全] 日期:2020-12-17 热度:147
因为我个人不是经常用git 所以看到 NG的中文官网的教程感觉怪怪的,很不顺畅,所以其英文官网看了下一些例子。今晚只是刚开始接触NG,但我已经被它深深折服。 不习惯用git所以 没有去布置环境,暂时还没理清楚 环境配置之类的内容。 直接导入 angular.js文件[详细]
-
smarttable的使用(基于angularjs)
所属栏目:[安全] 日期:2020-12-17 热度:120
js的引用 smarttable:"smarttable/Smart-Table.debug", 'smarttable' : {deps : ['angular']}, 1、html界面书写 !--表格-- div class="container" table st-table="displayed" class="table table-striped" thead tr th st-ratio="10" st-sort="id"序号/th t[详细]
-
angularJS下载站点-编译后的版本下载
所属栏目:[安全] 日期:2020-12-17 热度:62
需要下载各个版本的angularJS的童鞋请进入该网站 https://code.angularjs.org/[详细]
-
angularjs 三
所属栏目:[安全] 日期:2020-12-17 热度:85
import {Component} from 'angular2/core';import {HeroDetailComponent} from './hero-detail';@Component({ selector: 'appTest',template: ` h4下面是另一个component内容/h4 my-hero-detail/my-hero-detail h4上面是另一个component内容/h4 `,directives[详细]
-
angularjs 四
所属栏目:[安全] 日期:2020-12-17 热度:196
import {Component} from 'angular2/core';import {HeroDetailComponent} from './hero-detail';import {Hero} from './hero';import {HeroService} from './hero-service';@Component({ selector: 'appTest',template: ` h4 下面是providers内容/h4 ul li *[详细]
-
angularjs 五
所属栏目:[安全] 日期:2020-12-17 热度:131
import {Component} from 'angular2/core';import {ClickMeComponent} from './click-me';import {KeyUpComponent} from './keyup';import {LoopbackComponent} from './loopback';import {FocusComponent} from './focus';@Component({ selector: 'appTest'[详细]
-
AngularJS内置服务$http的使用——用户权限管理实例
所属栏目:[安全] 日期:2020-12-17 热度:139
1.实现目标: 选择用户角色,自动勾选权限。 2. (1)MySQL数据库的建立 (2)ng-repeat指令显示用户权限 (3)ng-checked指令控制用户权限 3.实例 (1)MySQL数据库的建立 t_role表 id rolename 1 系统管理员 2 总经理 r_right表 id rightname ischecked 1 人员管理[详细]
-
AngularJS Directive的使用
所属栏目:[安全] 日期:2020-12-17 热度:170
(1)使用Directive自定义HTML组件 restrict replace template !DOCTYPE html html lang= "en" head meta charset= "UTF-8" title AngularJS $http / title link rel= "stylesheet" href= "css/foundation.min.css" / head body div ng-app= "app" !--hello/he[详细]
-
angular学习之四实例:点击收缩展开下拉
所属栏目:[安全] 日期:2020-12-17 热度:175
我们知道平常jquery实现显示和隐藏的时候,只要在监听click的时候使用. toggle(".displayno"),如果页面已经存在隐藏类displayno,那么就移除隐藏类,将div块显示出来,否则添加隐藏类,将div块隐藏。或者使用show()+hide()方法来实现。 但是,在angular插件[详细]
-
angularjs 六
所属栏目:[安全] 日期:2020-12-17 热度:73
import {Component} from 'angular2/core';import {StudentFormComponent } from './student-form'@Component({ selector: 'appTest',template: 'student-form/student-form',directives: [StudentFormComponent ]})export class App {} /** * Created by de[详细]
-
angularjs 七
所属栏目:[安全] 日期:2020-12-17 热度:75
import {Component} from 'angular2/core';/** DatePipe 日期格式 UpperCasePipe 全部大写格式 LowerCasePipe 全部小写格式 CurrencyPipe 货币格式 PercentPipe 百分比格式 */@Component({ selector: 'appTest',/*template: `pThe hero's birthday is {{ bir[详细]
-
angularjs 八
所属栏目:[安全] 日期:2020-12-17 热度:132
import {Component} from 'angular2/core';import {StudentFormComponent } from './student-form'@Component({ selector: 'appTest',template: 'student-form/student-form',directives: [StudentFormComponent ]})export class App {} /** * Created by de[详细]
-
angularjs 九
所属栏目:[安全] 日期:2020-12-17 热度:110
import {Component} from 'angular2/core';import {ExponentialStrengthPipe} from './exponential-strength';@Component({ selector: 'appTest',template: ` h2Power Booster/h2 p Super power boost: {{10 | exponentialStrength : 10}} /p `,pipes: [Expo[详细]
-
angularjs 从外部改变controller内的数据
所属栏目:[安全] 日期:2020-12-17 热度:192
varappElement=document.querySelector('[ng-controller=seatsCtrl]');var$scope=angular.element(appElement).scope();$scope.$apply(function(){$scope.data=[{id:1,cnt:4},{id:3,cnt:5},{id:2,cnt:6}];}); 取到scope,然后调用$apply 或者在controller里[详细]
-
echarts 3.0 使用自定义图标
所属栏目:[安全] 日期:2020-12-17 热度:120
原来的模样: 使用自定义的图标之后: 感觉立即高大上了,这里的图标使用的是http://www.easyicon.net/,像素128px,图标的大小可以在echarts的option中设置: var option = { title: { text: 'Graph 简单示例' },tooltip: {},animationDurationUpdate: 1500[详细]
-
Angularjs留存(二)
所属栏目:[安全] 日期:2020-12-17 热度:62
PS: Angularjs留存系列主要是用来记录一些自己在学习其他文章时觉得有必要留存一下的fortune! 文章可能会很长(默认每篇17个小的知识点),但是我们可以使用Ctrl + F 来查找啦! 1、 AngularJS中,子作用域一般都会通过JavaScript原型继承机制继承其父作用域[详细]
-
angularjs 十
所属栏目:[安全] 日期:2020-12-17 热度:188
import {Component} from 'angular2/core';import {User} from "./User";import {UserService} from "./user-service";import {Logger} from "./logger-service";@Component({ selector: 'appTest',template: ` ul li *ngFor="#user of users"span{{user.nam[详细]
-
angular2 把TypeScript像写java那样面向接口编程 哈哈
所属栏目:[安全] 日期:2020-12-17 热度:163
import {Component} from 'angular2/core';import {User} from "./User";import {UserService} from "./user-service";@Component({ selector: 'appTest',template: ` ul li *ngFor="#user of users"span{{user.name}}/span{{user.age}}/li /ul `,providers:[详细]
-
深入理解 AngularJS 的 Scope
所属栏目:[安全] 日期:2020-12-17 热度:70
本文源地址链接:http://www.lovelucy.info/understanding-scopes-in-angularjs.html 本文作者:lovelucy 声明:本文为转载,请尊重原创,如您也需要转载,请注明源地址,而不要注明我的博客地址,谢谢。 一、遇到的问题 问题发生在使用 AngularJS 嵌套 Cont[详细]
-
angularjs “坑” 小结
所属栏目:[安全] 日期:2020-12-17 热度:93
1、复选框checkbox,使用ng-model双向绑定时,值有时不能更新,使用ng-checked暂时解决问题 2、父controller、子controller都需要改变一变量值,使用单向绑定“”时,父controller里对这一变量的操作,不能更新子controller中这一变量的值,使用双向绑定“=[详细]
-
angularjs2 官方学习方式
所属栏目:[安全] 日期:2020-12-17 热度:159
官方不仅仅有api,还有实例,看下面截图 点击 live example的链接就是示例[详细]