refactor: move angular source to /packages rather than modules/@angular
This commit is contained in:
25
packages/examples/platform-browser/dom/debug/ts/by/by.ts
Normal file
25
packages/examples/platform-browser/dom/debug/ts/by/by.ts
Normal file
@ -0,0 +1,25 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {DebugElement} from '@angular/core';
|
||||
import {By} from '@angular/platform-browser';
|
||||
|
||||
let debugElement: DebugElement;
|
||||
class MyDirective {}
|
||||
|
||||
// #docregion by_all
|
||||
debugElement.query(By.all());
|
||||
// #enddocregion
|
||||
|
||||
// #docregion by_css
|
||||
debugElement.query(By.css('[attribute]'));
|
||||
// #enddocregion
|
||||
|
||||
// #docregion by_directive
|
||||
debugElement.query(By.directive(MyDirective));
|
||||
// #enddocregion
|
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
|
||||
import {Component, NgModule} from '@angular/core';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
|
||||
|
||||
@Component({selector: 'my-component'})
|
||||
class MyAppComponent {
|
||||
}
|
||||
|
||||
// #docregion providers
|
||||
@NgModule({imports: [BrowserModule], bootstrap: [MyAppComponent]})
|
||||
class AppModule {
|
||||
}
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
// #enddocregion
|
Reference in New Issue
Block a user