ngMessages.ngMessagesInclude (directive)

Improve this Doc View Source ngMessagesInclude

  1. directive in module ngMessages

ngMessagesInclude is a directive with the purpose to import existing ngMessage template code from a remote template and place the downloaded template code into the exact spot that the ngMessagesInclude directive is placed within the ngMessages container. This allows for a series of pre-defined messages to be reused and also allows for the developer to determine what messages are overridden due to the placement of the ngMessagesInclude directive.

Directive Info

  • This directive creates new scope.
  • This directive executes at priority level 0.

Usage

<!-- using attribute directives -->
<ANY ng-messages="expression" role="alert">
  <ANY ng-messages-include="remoteTplString">...</ANY>
</ANY>

<!-- or by using element directives -->
<ng-messages for="expression" role="alert">
  <ng-messages-include src="expressionValue1">...</ng-messages-include>
</ng-messages>

Click here to learn more about ngMessages and ngMessage.

Arguments

Param Type Details
ngMessagesInclude | src string

a string value corresponding to the remote template.

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.6.4/docs/api/ngMessages/directive/ngMessagesInclude

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部