3、动态加载的内容:

home.js

[html] view plain copy 在CODE上查看代码片派生到我的代码片

define(['app'], function(app)

{

app.controller('HomeViewController',

['$scope',function($scope) {

document.getElementById("test").onclick = function(){

swal($scope.title);

}

$scope.title = "Home Home Home Home";

}

]);

});

home-view.js

[html] view plain copy 在CODE上查看代码片派生到我的代码片

<div ng-controller="HomeViewController">

<button ui-sref="about">About</button>

<h1>{{ title }}</h1>

<br/>

<form name = "registerForm" id = "registerForm" method="post" class="form-horizontal" novalidate >

<p class="bg-warning" style = "margin-left:50px;margin-right:50px;"><i class="glyphicon glyphicon-info-sign"></i><span > <b>温馨提示:带<span style="color:red"> *</span>为必填项</b></span></p>

<div>

<div class="form-group" style = "margin-left:50px;margin-right:-250px;">

<label class="control-label col-md-1" for="merchantName">商户名称<span style="color:red"> *</span></label>

<div class="col-md-2" show-errors>

<input type="text" class="form-control" id="merchantName" name = "merchantName" ng-model="merhantBaseInfo.merchantName" required>

<div class="help-block" ng-messages="registerForm.merchantName.$error" ng-if="registerForm.merchantName.$touched">

<span ng-message="required" >用户名不能为空</span>

</div>

</div>

<label class="control-label col-md-1" for="merchantShortName">商户简称</label>

<div class="col-md-2" >

<input type="text" class="form-control" id="merchantShortName" name ="merchantShortName"  ng-model="merhantBaseInfo.merchantShortName"  >

</div>

<label class="control-label col-md-1" for="type">商户类型<span style="color:red"> *</span></label>

<div class="col-md-2" show-errors>

<select  class="form-control" id="type" name = "type" ng-model="merhantBaseInfo.type"  ng-options="type.name as type.desc for type in MerchantTypeArray" required >

<option value="">-- 请选择 --</option>

</select>

<div class="help-block" ng-messages="registerForm.type.$error" ng-if="registerForm.type.$touched">

<span ng-message="required" >商户类型不能为空</span>

</div>

</div>

</div>

<div class="form-group" style = "margin-left:50px;margin-right:-250px;">

<label class="control-label col-md-1" for="comRegName">商户工商注册全名<span style="color:red"> *</span></label>

<div class="col-md-5" show-errors>

<input type="text" class="form-control" id="comRegName" name = "comRegName" ng-model="merhantBaseInfo.comRegName" required>

<div class="help-block" ng-messages="registerForm.comRegName.$error" ng-if="registerForm.comRegName.$touched">

<span ng-message="required" >商户注册全名不能为空</span>

</div>

</div>

<label class="control-label col-md-1" for="industry">所属行业<span style="color:red"> *</span></label>

<div class="col-md-2" show-errors>

<select  class="form-control" id="industry" name = "industry" ng-model="merhantBaseInfo.industry" ng-options="industry.name as industry.desc for industry in IndustryArray" required>

<option value="">-- 请选择 --</option>

</select>

<div class="help-block" ng-messages="registerForm.industry.$error" ng-if="registerForm.industry.$touched">

<span ng-message="required" >所属行业不能为空</span>

</div>

</div>

</div>

<div class="form-group" style = "margin-left:50px;margin-right:-250px;">

<label class="control-label col-md-1" for="coopMode">合作模式<span style="color:red"> *</span></label>

<div class="col-md-2" show-errors>

<select  class="form-control" id="coopMode" name = "coopMode" ng-model="merhantBaseInfo.coopMode" ng-options="coopMode.name as coopMode.desc for coopMode in CoopModeArray" required>

<option value="">-- 请选择 --</option>

</select>

<div class="help-block" ng-messages="registerForm.coopMode.$error" ng-if="registerForm.coopMode.$touched">

<span ng-message="required" >合作模式不能为空</span>

</div>

</div>

<label class="control-label col-md-1" for="baseAcctBank">基本帐户开户银行名称</label>

<div class="col-md-2">

<input type="text" class="form-control" id="baseAcctBank" name = "baseAcctBank" ng-model="merhantBaseInfo.baseAcctBank" >

</div>

<label class="control-label col-md-1" for="baseAcct">银行基本帐户账号</label>

<div class="col-md-2" >

<input type="text" class="form-control" id="baseAcct" name ="baseAcct"  ng-model="merhantBaseInfo.baseAcct"  >

</div>

</div>

<div class="form-group" style = "margin-left:50px;margin-right:-250px;">

<label class="control-label col-md-1" for="org">组织机构代码</label>

<div class="col-md-2" show-errors>

<input type="text" class="form-control" id="org" name = "org" ng-model="merhantBaseInfo.org" >

</div>

<label class="control-label col-md-1" for="businessLicense">营业执照</label>

<div class="col-md-2" >

<input type="text" class="form-control" id="businessLicense" name = "businessLicense" ng-model="merhantBaseInfo.businessLicense" >

</div>

<label class="control-label col-md-1" for="taxId">纳税人代码</label>

<div class="col-md-2" >

<input type="text" class="form-control" id="taxId" name = "taxId" ng-model="merhantBaseInfo.taxId" >

</div>

</div>

<div class="form-group" style = "margin-left:50px;margin-right:-250px;">

<label class="control-label col-md-1" for="officePhone">公司电话</label>

<div class="col-md-2" >

<input type="text" class="form-control" id="officePhone" name ="officePhone" ng-model="merhantBaseInfo.officePhone" >

</div>

<label class="control-label col-md-1" for="address">地址</label>

<div class="col-md-2" >

<input type="text" class="form-control" id="address" name = "address" ng-model="merhantBaseInfo.address" >

</div>

<label class="control-label col-md-1" for="websiteUrl">公司网址</label>

<div class="col-md-2" >

<input type="text" class="form-control" id="websiteUrl" name = "websiteUrl" ng-model="merhantBaseInfo.websiteUrl" >

</div>

</div>

<div class="form-group" style = "margin-left:50px;margin-right:-250px;">

<label class="control-label col-md-1" for="scale">企业规模</label>

<div class="col-md-2">

<select type="text" class="form-control" id="scale" name = "scale" ng-model="merhantBaseInfo.scale" ng-options="scale.name as scale.desc for scale in ScaleArray" >

<option value="">-- 请选择 --</option>

</select>

</div>

<label class="control-label col-md-1" for="legalPerson">企业法人</label>

<div class="col-md-2">

<input type="text" class="form-control" id="legalPerson" name = "legalPerson" ng-model="merhantBaseInfo.legalPerson" >

</div>

<label class="control-label col-md-1" for="legalPersonId">法人证件号码</label>

<div class="col-md-2">

<input type="text" class="form-control" id="legalPersonId" name = "legalPersonId" ng-model="merhantBaseInfo.legalPersonId" >

</div>

</div>

<div class="form-group" style = "margin-left:50px;margin-right:-250px;">

<label class="control-label col-md-1" for="province">合作区域<span style="color:red"> *</span></label>

<div class="col-md-2" show-errors>

<select type="text" id = "province" name = "province" class="form-control" ng-model="merhantBaseInfo.province"  ng-change = "changeProvince()" ng-options="province.areaId as province.areaName for province in AllProvinceArray"   required>

<option value="">---请选择---</option>

</select>

<div class="help-block" ng-messages="registerForm.province.$error" ng-if="registerForm.province.$touched">

<span ng-message="required" >合作区域不能为空</span>

</div>

</div>

<div class="col-md-2">

<select type="text" class="form-control" ng-model="merhantBaseInfo.city" ng-change="changeCity()" ng-options="city.areaId as city.areaName for city  in nowCityArray">

<option value="">---请选择---</option>

</select>

</div>

<div class="col-md-2">

<select type="text" class="form-control" ng-model="merhantBaseInfo.district" ng-change="area=''" ng-options="district.areaId as district.areaName for district  in nowDistrictArray">

<option value="">---请选择---</option>

</select>

</div>

</div>

<div class="form-group" style = "margin-left:50px;margin-right:-250px;">

<label class="control-label col-md-1" for="remark">备注</label>

<div class="col-md-8">

<textarea class="form-control" cols="4" id="remark" name="remark" ng-model="merhantBaseInfo.remark" rows="2" style = "resize: none;"></textarea>

</div>

</div>

</div>

<div>

</form>

</div>

AngularJS+RequireJs实现动态加载JS和页面的方案研究【中】的更多相关文章

  1. AngularJS+RequireJs实现动态加载JS和页面的方案研究【上】

    1.入口页面 存放地址:src/main/webapp/WEB-INF/view/workflow/workflow.jsp [html] view plain copy 在CODE上查看代码片派生到 ...

  2. AngularJS+RequireJs实现动态加载JS和页面的方案研究【下】

    about.js: [html] view plain copy 在CODE上查看代码片派生到我的代码片 define(['app'], function(app) { app.controller( ...

  3. [AngularJS] 使用AngularAMD动态加载Controller

    [AngularJS] 使用AngularAMD动态加载Controller 前言 使用AngularJS来开发Single Page Application(SPA)的时候,可以选用AngularU ...

  4. [AngularJS] 使用AngularCSS动态加载CSS

    [AngularJS] 使用AngularCSS动态加载CSS 前言 使用AngularAMD动态加载Controller 使用AngularAMD动态加载Service 上列两篇文章里,介绍了如何如 ...

  5. [AngularJS] 使用AngularAMD动态加载Service

    [AngularJS] 使用AngularAMD动态加载Service 前言 「使用AngularAMD动态加载Controller」:这篇文章里介绍如何使用AngularAMD来动态加载Contro ...

  6. 使用jQuery动态加载js脚本

    动态加载Javascript是一项非常强大且有用的技术.这方面的主题在本站已经讨论了不少,我也经常会在一些个人项目上使用RequireJS和Dojo加载js.它们很强大,但有时候也会得不偿失.如果你使 ...

  7. 使用jQuery动态加载js脚本文件的方法

    动态加载Javascript是一项非常强大且有用的技术.这方面的主题在网上已经讨论了不少,我也经常会在一些个人项目上使用RequireJS和Dojo加载js 它们很强大,但有时候也会得不偿失.如果你使 ...

  8. JavaScript动态加载js文件

    /********************************************************************* * JavaScript动态加载js文件 * 说明: * ...

  9. 动态加载js和css

    开发过程中经常需要动态加载js和css,今天特意总结了一下常用的方法. 1.动态加载js 方法一:动态加载js文件 // 动态加载js脚本文件 function loadScript(url) { v ...

随机推荐

  1. 往word中插入美观的代码

    http://www.planetb.ca/syntax-highlight-word 选择需要的语言,然后Show Highlighted,复制跳转页面显示的代码至word即可

  2. HAL库定时器

    1.在cubmx中设置时钟源,设置对应的定时器,预分频系数,计数模式,是否自动重装载,中断使能,中断优先级 2.HAL_TIM_Base_Start_IT(&htim2);开启定时器中断 3. ...

  3. pygame学习_part1_pygame写程序前的准备工作

    import pygame from pygame import * pygame.init() #准备pygame,不准备无法使用功能 pygame.display.set_mode((x,y坐标) ...

  4. 皕杰报表 javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

    今天做报表的时候,跳转到显示报表页面的时候不出来数据,报错说数据集未产生. 后台报错 javax.naming.NameNotFoundException: Name jdbc is not boun ...

  5. 事务控制语句,begin,rollback,savepoint,隐式提交的SQL语句

    事务控制语句 在MySQL命令行的默认设置下,事务都是自动提交的,即执行SQL语句后就会马上执行COMMIT操作.因此开始一个事务,必须使用BEGIN.START TRANSACTION,或者执行SE ...

  6. PTA (Advanced Level) 1018 Public Bike Management

    Public Bike Management There is a public bike service in Hangzhou City which provides great convenie ...

  7. PgAdmin4连接数据库报错:Unable to connect to server: ERROR: unrecognized configuration parameter "bytea_output"

    原因: PgAdmin 4不再支持PostgreSQL 9.0 和更早的版本 我的版本是8.2.15 template1=# select version(); version ----------- ...

  8. HDFS Java Client对hdfs文件增删查改

      step1:增加依赖 pom.xml           ...      <!-- https://mvnrepository.com/artifact/org.apache.hadoop ...

  9. 手把手教你用 Keras 实现 LSTM 预测英语单词发音

    1. 动机 我近期在研究一个 NLP 项目,根据项目的要求,需要能够通过设计算法和模型处理单词的音节 (Syllables),并对那些没有在词典中出现的单词找到其在词典中对应的押韵词(注:这类单词类似 ...

  10. [javaSE] GUI(打开文件对话框)

    使用FileDialog可以打开文件对话框,根据模式不同,可以分为打开文件和保存文件对话框 获取FileDialog对象,new出来,参数:所属Frame对象,String的标题,FileDialog ...