This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import VueRouter from 'vue-router'; | |
import { getUser } from './auth'; // Replace with your authentication utility | |
// Step 1: Define Routes with Role Metadata | |
const routes = [ | |
{ | |
path: '/dashboard', | |
component: Dashboard, | |
meta: { requiresAuth: true, roles: ['admin', 'user'] } // Dashboard accessible by both admins and users | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## openconnect ocserv | |
# Clone | |
clone the repository from [github](https://github.com/wppurking/ocserv-docker) | |
``` | |
cd ~; | |
git clone https://github.com/wppurking/ocserv-docker.git; | |
docker run -d --privileged --name ocserv-docker -v ~/ocserv-docker/ocserv:/etc/ocserv -p 443:443 wppurking/ocserv | |
``` | |
now you can connect to ocserv at your server's ip at port 443 like $ipaddress:443 | |
# diffrent port |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { RouterModule, Routes } from '@angular/router'; | |
import { Router } from '@angular/router'; | |
import {InfoComponent} from './info.component' | |
export class Hero { | |
name:string; | |
email:string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
export class Hero { | |
name: string, | |
event_name: string, | |
email:string | |
} | |
var Heroes:Hero[]=[{name:'',event_name:'',email:''}]; | |
var local :Hero[]; | |
@Component({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
body { | |
font-family: Arial; | |
font-size: 33px; | |
} | |
a { |