view-info
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

view-info

angular7+以上的版本可以使用

1、开始使用

安装

npm i view-info

使用

ViewInfoModule需添加到使用的module的文件中。此处以AppModule为例:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
 
import { ViewInfoModule } from 'view-info';
 
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
 
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    ViewInfoModule
    AppRoutingModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
import { Component } from '@angular/core';
 
@Component({
  selector: 'app-root',
  template: `
    <c-view-info [viewInfoTemplate]="name"></c-view-info>
 
    <ng-template #name>
      <div>我是view-info</div>
    </ng-template>
  `,
  style: [`
    div {
      height: 1000px;
    }
  `]
})
export class AppComponent {}

Package Sidebar

Install

npm i view-info

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

31.3 kB

Total Files

23

Last publish

Collaborators

  • miyoko0505