mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-23 01:40:25 +00:00
we now have two types of namespaces: - true namespace: angular.* - used for all global apis - virtual namespace: ng.*, ngMock.*, ... - used for all DI modules the virual namespaces have services under the second namespace level (e.g. ng.) and filters and directives prefixed with filter: and directive: respectively (e.g. ng.filter:orderBy, ng.directive:ngRepeat) this simplifies urls and makes them a lot shorter while still avoiding name collisions
33 lines
1,011 B
JavaScript
33 lines
1,011 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* @ngdoc directive
|
|
* @name ng.directive:ngNonBindable
|
|
* @priority 1000
|
|
*
|
|
* @description
|
|
* Sometimes it is necessary to write code which looks like bindings but which should be left alone
|
|
* by angular. Use `ngNonBindable` to make angular ignore a chunk of HTML.
|
|
*
|
|
* @element ANY
|
|
*
|
|
* @example
|
|
* In this example there are two location where a simple binding (`{{}}`) is present, but the one
|
|
* wrapped in `ngNonBindable` is left alone.
|
|
*
|
|
* @example
|
|
<doc:example>
|
|
<doc:source>
|
|
<div>Normal: {{1 + 2}}</div>
|
|
<div ng-non-bindable>Ignored: {{1 + 2}}</div>
|
|
</doc:source>
|
|
<doc:scenario>
|
|
it('should check ng-non-bindable', function() {
|
|
expect(using('.doc-example-live').binding('1 + 2')).toBe('3');
|
|
expect(using('.doc-example-live').element('div:last').text()).
|
|
toMatch(/1 \+ 2/);
|
|
});
|
|
</doc:scenario>
|
|
</doc:example>
|
|
*/
|
|
var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });
|