Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Raster Grid in an Angular app #11

Open
jb9474 opened this issue Apr 16, 2020 · 3 comments
Open

Using Raster Grid in an Angular app #11

jb9474 opened this issue Apr 16, 2020 · 3 comments

Comments

@jb9474
Copy link

jb9474 commented Apr 16, 2020

mega noob incoming.

Im hacking my way around angular and raster grid then made the foolish error of trying to include the .css files in an angular component and the 'r-cell' etc html in the template. this throws up all kind of errors, and im starting to learn why.

Has anyone successfully incorporated raster grid into an angular app please?

Do the 'r-cell' 'r-grid' etc elements need to be declared in angular via Angular Elements?

Many thanks, would be good to use raster in my little angular project.

Jeremy
slonch.com

@jb9474
Copy link
Author

jb9474 commented Apr 16, 2020

ok ok

dug more and it hopefully looks pretty simple:

schemas: [ CUSTOM_ELEMENTS_SCHEMA ] needed in @NgModule

https://stackoverflow.com/questions/39428132/custom-elements-schema-added-to-ngmodule-schemas-still-showing-error

hope this helps anyone with a similar intention.

nice work Rasmus!

@Londeren
Copy link

You can also create custom components like this

@Component({
  selector: 'r-cell',
  template: '<ng-content></ng-content>',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class GridColComponent implements OnInit {
  @Input() span: any;
}

@jb9474
Copy link
Author

jb9474 commented May 16, 2020

thanks @Londeren will give that a go to!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants