mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Take out all special characters in string
This commit is contained in:
@@ -57,6 +57,7 @@ export class NewGroupPage implements OnInit {
|
|||||||
|
|
||||||
createGroup(){
|
createGroup(){
|
||||||
let name = this.groupName.split(' ').join('-');
|
let name = this.groupName.split(' ').join('-');
|
||||||
|
//Take out all special characters in string
|
||||||
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
name = name.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
||||||
let body = { "name":name, }
|
let body = { "name":name, }
|
||||||
this.chatService.addGroup(body).subscribe(res=>{
|
this.chatService.addGroup(body).subscribe(res=>{
|
||||||
|
|||||||
@@ -41,13 +41,11 @@ export class NewGroupPage implements OnInit{
|
|||||||
{
|
{
|
||||||
this.isGroupCreated = false;
|
this.isGroupCreated = false;
|
||||||
//this.groupName = this.navParams.get('name');
|
//this.groupName = this.navParams.get('name');
|
||||||
alert('New group '+this.dataService.get("newGroup"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.router.events.forEach((event) => {
|
this.router.events.forEach((event) => {
|
||||||
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
|
if (event instanceof NavigationStart && event.url.startsWith('/home/chat')) {
|
||||||
alert('New group '+this.dataService.get("newGroup"))
|
|
||||||
if (this.dataService.get("newGroup")) {
|
if (this.dataService.get("newGroup")) {
|
||||||
this.task = this.dataService.get("task");
|
this.task = this.dataService.get("task");
|
||||||
this.groupName = this.task.Folio;
|
this.groupName = this.task.Folio;
|
||||||
|
|||||||
Reference in New Issue
Block a user