Can you get the variable b
?
let a = function() {
const b = 20;
}
console.log(a().b);
Can you get the variable b
?
let a = function() {
const b = 20;
}
console.log(a().b);
Create a new component withionic g c list-user
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-list-user',
templateUrl: './list-user.component.html',
styleUrls: ['./list-user.component.scss'],
})
export class ListUserComponent implements OnInit {
constructor() { }
And this is the file app.module.ts
import { ListUser } from './list-user/list-user.component';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent, ListUser],
ngOnInit() {}
}
This is the error I get:
compiler.js:2430 Uncaught Error: Unexpected value 'undefined' declared by the module 'AppModule'
at syntaxError (compiler.js:2430)
at compiler.js:18685
at Array.forEach (<anonymous>)
at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver.getNgModuleMetadata (compiler.js:18683)
at