Skip to content

Commit 78d3f62

Browse files
committed
chore: rename non-bindable to ng-non-bindable
1 parent d310a9c commit 78d3f62

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

modules/angular2/directives.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
import {CONST_EXPR} from './src/facade/lang';
99
import {For} from './src/directives/for';
1010
import {NgIf} from './src/directives/ng_if';
11-
import {NonBindable} from './src/directives/non_bindable';
11+
import {NgNonBindable} from './src/directives/ng_non_bindable';
1212
import {Switch, SwitchWhen, SwitchDefault} from './src/directives/switch';
1313

1414
export * from './src/directives/class';
1515
export * from './src/directives/for';
1616
export * from './src/directives/ng_if';
17-
export * from './src/directives/non_bindable';
17+
export * from './src/directives/ng_non_bindable';
1818
export * from './src/directives/switch';
1919

2020
/**
@@ -58,5 +58,5 @@ export * from './src/directives/switch';
5858
*
5959
*/
6060
export const coreDirectives:List = CONST_EXPR([
61-
For, NgIf, NonBindable, Switch, SwitchWhen, SwitchDefault
61+
For, NgIf, NgNonBindable, Switch, SwitchWhen, SwitchDefault
6262
]);

modules/angular2/src/directives/non_bindable.js renamed to modules/angular2/src/directives/ng_non_bindable.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {Directive} from 'angular2/src/core/annotations_impl/annotations';
22

33
/**
4-
* The `NonBindable` directive tells Angular not to compile or bind the contents of the current
4+
* The `NgNonBindable` directive tells Angular not to compile or bind the contents of the current
55
* DOM element. This is useful if the element contains what appears to be Angular directives and
66
* bindings but which should be ignored by Angular. This could be the case if you have a site that
77
* displays snippets of code, for instance.
@@ -16,8 +16,8 @@ import {Directive} from 'angular2/src/core/annotations_impl/annotations';
1616
* @exportedAs angular2/directives
1717
*/
1818
@Directive({
19-
selector: '[non-bindable]',
19+
selector: '[ng-non-bindable]',
2020
compileChildren: false
2121
})
22-
export class NonBindable {
22+
export class NgNonBindable {
2323
}

modules/angular2/test/directives/non_bindable_spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ import {View} from 'angular2/src/core/annotations_impl/view';
1717

1818
import {ElementRef} from 'angular2/src/core/compiler/element_ref';
1919

20-
import {NonBindable} from 'angular2/src/directives/non_bindable';
20+
import {NgNonBindable} from '../../src/directives/ng_non_bindable';
2121

2222
import {TestBed} from 'angular2/src/test_lib/test_bed';
2323

2424
export function main() {
2525
describe('non-bindable', () => {
2626
it('should not interpolate children', inject([TestBed, AsyncTestCompleter], (tb, async) => {
27-
var template = '<div>{{text}}<span non-bindable>{{text}}</span></div>';
27+
var template = '<div>{{text}}<span ng-non-bindable>{{text}}</span></div>';
2828
tb.createView(TestComponent, {html: template}).then((view) => {
2929
view.detectChanges();
3030
expect(DOM.getText(view.rootNodes[0])).toEqual('foo{{text}}');
@@ -33,7 +33,7 @@ export function main() {
3333
}));
3434

3535
it('should ignore directives on child nodes', inject([TestBed, AsyncTestCompleter], (tb, async) => {
36-
var template = '<div non-bindable><span id=child test-dec>{{text}}</span></div>';
36+
var template = '<div ng-non-bindable><span id=child test-dec>{{text}}</span></div>';
3737
tb.createView(TestComponent, {html: template}).then((view) => {
3838
view.detectChanges();
3939
var span = DOM.querySelector(view.rootNodes[0], '#child');
@@ -43,7 +43,7 @@ export function main() {
4343
}));
4444

4545
it('should trigger directives on the same node', inject([TestBed, AsyncTestCompleter], (tb, async) => {
46-
var template = '<div><span id=child non-bindable test-dec>{{text}}</span></div>';
46+
var template = '<div><span id=child ng-non-bindable test-dec>{{text}}</span></div>';
4747
tb.createView(TestComponent, {html: template}).then((view) => {
4848
view.detectChanges();
4949
var span = DOM.querySelector(view.rootNodes[0], '#child');
@@ -55,7 +55,7 @@ export function main() {
5555
}
5656

5757
@Component({selector: 'test-cmp'})
58-
@View({directives: [NonBindable, TestDirective]})
58+
@View({directives: [NgNonBindable, TestDirective]})
5959
class TestComponent {
6060
text: string;
6161
constructor() {

0 commit comments

Comments
 (0)