Merge pull request #2532 from dpalou/MOBILE-3549

MOBILE-3549 siteplugins: Allow any HTML tag
main
Juan Leyva 2020-09-22 12:51:57 +02:00 committed by GitHub
commit 5f9ebc7805
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import { Injectable, Injector, Component, NgModule, Compiler, ComponentFactory, ComponentRef, NgModuleRef } from '@angular/core';
import {
Injectable, Injector, Component, NgModule, Compiler, ComponentFactory, ComponentRef, NgModuleRef, NO_ERRORS_SCHEMA
} from '@angular/core';
import { JitCompilerFactory } from '@angular/platform-browser-dynamic';
import {
Platform, ActionSheetController, AlertController, LoadingController, ModalController, PopoverController, ToastController,
@ -179,7 +181,7 @@ export class CoreCompileProvider {
const imports = this.IMPORTS.concat(extraImports);
// Now create the module containing the component.
const module = NgModule({imports: imports, declarations: [component]})(class {});
const module = NgModule({imports: imports, declarations: [component], schemas: [NO_ERRORS_SCHEMA]})(class {});
try {
// Compile the module and the component.
@ -193,6 +195,9 @@ export class CoreCompileProvider {
}
});
} catch (ex) {
this.logger.error('Error compiling template', template);
this.logger.error(ex);
return Promise.reject({message: 'Template has some errors and cannot be displayed.', debuginfo: ex});
}
}